Skip to content
Advertisement

Cant select text, cant position caret in Firefox – Slatejs

Description

Slatejs editor only in Firefox fails with text selection and caret positioning (by mouse). It always selects position before first character (path[0] offset[0]). You can still use the keyboard to select text and position caret.

Recording

Firefox: enter image description here

Chrome: https://i.imgur.com/UdH1xM7.gif

Expectation

It should select text and position caret as it does in other browsers.

Environment

  • Slate Version: 0.63.0
  • Operating System: Windows 10
  • Browser: Firefox 90.0.1 (64-bit)

Editor implementation for reference

JavaScript

Any ideas what might have caused it?

Advertisement

Answer

Dumb mistake. My CSS reset file contained: “user-select: none”, which was somehow ignored by Chrome.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement