Skip to content

Commit

Permalink
Disable fake CM on firefox to fix highlighting in PDF export (#2900)
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Apr 19, 2024
1 parent 35a9a4a commit b4066d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/components/CellInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4066d3

Please sign in to comment.