Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double clicking on nodes with active marks don't work properly - Firefox #4634

Closed
bishoymelek opened this issue Oct 28, 2021 · 2 comments · Fixed by #5275
Closed

Double clicking on nodes with active marks don't work properly - Firefox #4634

bishoymelek opened this issue Oct 28, 2021 · 2 comments · Fixed by #5275

Comments

@bishoymelek
Copy link

Description
double click on a word which has a different mark from the rest of the line, will consider it to be an active mark when testing in firefox.

Recording
bold

Sandbox
Test it here in the example

Steps
To reproduce the behavior:

  1. Go to sandbox
  2. Double click on a word
  3. Mark the word with bold
  4. select any normal text, it should let the mark inactive (that works 👍)
  5. then double click again on the first word we used, the mark we used should be active (doesn't work)
  6. if you clicked on the mark again, nothing changes (an error)

Environment

  • Slate Version: [e.g. 0.62.0]
  • Operating System: [e.g. Mac OS]
  • Browser: [e.g. FireFox]
@imdbsd
Copy link
Contributor

imdbsd commented Nov 6, 2021

im facing this issue and when try to debug it, domSelection is difference between firefox and chrome. https://github.com/ianstormtaylor/slate/blob/main/packages/slate-react/src/components/editable.tsx#L488. The domSelection is return a same object if select it with shit + arrow. Still searching for the workaround and fix.

@ppvolto
Copy link

ppvolto commented Apr 1, 2022

The main Problem on Firefox is when you double click a leaf in a sequence of leafs, the Selection is from the End of the leading leaf and the Beginning of the tailing leaf what is OK, but it ignores or can not get the leaf in-between. Hand selecting the leaf works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants