From b4066d34021bf60c8f3195469b2f1262bc7cf3fb Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Sat, 20 Apr 2024 00:01:24 +0200 Subject: [PATCH] Disable fake CM on firefox to fix highlighting in PDF export (#2900) --- frontend/components/CellInput.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/components/CellInput.js b/frontend/components/CellInput.js index 2e09e865b2..a567e9dcf8 100644 --- a/frontend/components/CellInput.js +++ b/frontend/components/CellInput.js @@ -424,7 +424,9 @@ export const CellInput = ({ const [show_static_fake_state, set_show_static_fake] = useState(!skip_static_fake) - const show_static_fake = useMemo(() => focus_after_creation || cm_forced_focus != null || skip_static_fake, []) ? false : show_static_fake_state + const show_static_fake = useMemo(() => navigator.userAgent.includes("Firefox") || focus_after_creation || cm_forced_focus != null || skip_static_fake, []) + ? false + : show_static_fake_state useLayoutEffect(() => { if (!show_static_fake) return