From dae02460a2d5271c4234930f7dea89254d253b05 Mon Sep 17 00:00:00 2001 From: Parasaran Date: Sat, 14 Dec 2024 16:41:52 +0530 Subject: [PATCH 1/3] fix 6931: CSS changes in the playground to allow scrolling if the cell content overflows, and inheriting the same behavior for the nested

tag. --- .../lexical-playground/src/themes/PlaygroundEditorTheme.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css index 2e985c4dc8d..24f6e6078c1 100644 --- a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css +++ b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css @@ -15,6 +15,7 @@ .PlaygroundEditorTheme__paragraph { margin: 0; position: relative; + overflow: inherit; } .PlaygroundEditorTheme__quote { margin: 0; @@ -213,6 +214,7 @@ padding: 6px 8px; position: relative; outline: none; + overflow: auto; } .PlaygroundEditorTheme__tableCellResizer { position: absolute; From e361db2c8ed21cc908ee91b8adca5d3cfc3ef034 Mon Sep 17 00:00:00 2001 From: Parasaran Date: Sat, 14 Dec 2024 22:45:37 +0530 Subject: [PATCH 2/3] Added a comment note about the firefox workaround --- .../lexical-playground/src/themes/PlaygroundEditorTheme.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css index 24f6e6078c1..9f95e53246a 100644 --- a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css +++ b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css @@ -15,6 +15,11 @@ .PlaygroundEditorTheme__paragraph { margin: 0; position: relative; + + /* + A firefox workaround to allow scrolling of overflowing table cell + ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1904159 + */ overflow: inherit; } .PlaygroundEditorTheme__quote { From a8630c609c62bdbd3e5ca3c327c1ab0467ac4545 Mon Sep 17 00:00:00 2001 From: Parasaran Date: Sat, 14 Dec 2024 23:30:46 +0530 Subject: [PATCH 3/3] Added a separate CSS rule to target all direct descendants of table cell --- .../src/themes/PlaygroundEditorTheme.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css index 9f95e53246a..d7041331a52 100644 --- a/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css +++ b/packages/lexical-playground/src/themes/PlaygroundEditorTheme.css @@ -15,12 +15,6 @@ .PlaygroundEditorTheme__paragraph { margin: 0; position: relative; - - /* - A firefox workaround to allow scrolling of overflowing table cell - ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1904159 - */ - overflow: inherit; } .PlaygroundEditorTheme__quote { margin: 0; @@ -221,6 +215,13 @@ outline: none; overflow: auto; } +/* + A firefox workaround to allow scrolling of overflowing table cell + ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1904159 +*/ +.PlaygroundEditorTheme__tableCell > * { + overflow: inherit; +} .PlaygroundEditorTheme__tableCellResizer { position: absolute; right: -4px;