From 7d3c8fb78d8a5e027aa72e6f5274d1e76748ffdf Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Wed, 13 Sep 2023 11:12:49 +0100 Subject: [PATCH] Merge pull request #14822 from overleaf/mj-safari-table-size [visual] Workaround for safari table size GitOrigin-RevId: 937a606bf3b6093029e5a952c2a13a3f083ca74c --- .../features/source-editor/components/table-generator/table.tsx | 2 +- .../features/source-editor/extensions/visual/table-generator.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/source-editor/components/table-generator/table.tsx b/services/web/frontend/js/features/source-editor/components/table-generator/table.tsx index 25be28c04b..d3fd0990ae 100644 --- a/services/web/frontend/js/features/source-editor/components/table-generator/table.tsx +++ b/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%)` }} > diff --git a/services/web/frontend/js/features/source-editor/extensions/visual/table-generator.ts b/services/web/frontend/js/features/source-editor/extensions/visual/table-generator.ts index dbcd1f204e..b1a68110e9 100644 --- a/services/web/frontend/js/features/source-editor/extensions/visual/table-generator.ts +++ b/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',