Sfoglia il codice sorgente

Merge pull request #14822 from overleaf/mj-safari-table-size

[visual] Workaround for safari table size

GitOrigin-RevId: 937a606bf3b6093029e5a952c2a13a3f083ca74c
Mathias Jakobsen 3 anni fa
parent
commit
7d3c8fb78d

+ 1 - 1
services/web/frontend/js/features/source-editor/components/table-generator/table.tsx

@@ -333,7 +333,7 @@ export const Table: FC = () => {
       onKeyDown={onKeyDown}
       tabIndex={-1}
       ref={tableRef}
-      style={{ width: `${tableWidth}ch` }}
+      style={{ width: `min(${tableWidth}ch, 95%)` }}
     >
       <colgroup>
         <col width="20" />

+ 1 - 0
services/web/frontend/js/features/source-editor/extensions/visual/table-generator.ts

@@ -126,6 +126,7 @@ export const tableGeneratorTheme = EditorView.baseTheme({
 
   '.table-generator-table': {
     'table-layout': 'fixed',
+    width: '95%',
     'max-width': '95%',
     margin: '0 auto',
     cursor: 'default',