google/playground-elements

Cursor disappears after blurring and re-focusing in Firefox

rwalle opened this issue · 3 comments

Reproduction steps using the official demo:

  1. Make any change to any file in the editor
  2. Switch to a different file
  3. Click inside the editor -- cursor no longer shows up until click somewhere else in the browser that has a cursor (e.g. browser address bar) and comes back

Reproduced on Firefox 111 and on both Windows 10 and Windows 11.

It is unclear if this is an issue in the playground-elements, codemirror or Firefox.

I think this is an issue with ShadowRoot + ContentEditable.

ProseMirror has the same problem and I solved it with a plugin.

https://github.com/KonnorRogers/rhino-editor/blob/main/src/exports/extensions/firefox-caret-plugin.ts

ProseMirror/prosemirror#1113 (comment)

rwalle commented

No longer reproducible in Firefox 117.