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

Firefox: wrong selection with double click on a text node #3336

Closed
cvlmtg opened this issue Dec 17, 2019 · 3 comments · Fixed by #5275
Closed

Firefox: wrong selection with double click on a text node #3336

cvlmtg opened this issue Dec 17, 2019 · 3 comments · Fixed by #5275

Comments

@cvlmtg
Copy link
Contributor

cvlmtg commented Dec 17, 2019

Do you want to request a feature or report a bug?

bug

What's the current behavior?

double click on a word in an unformatted paragraph (i.e. made of just one text node) and apply some formatting. then deselect and select it again. even if the browser shows the word as selected, slate has selected the whole paragraph. you can see it because the next style is applied to the whole line and not just the word. on Chrome it seems to work correctly.

Registrazione schermo 2019-12-17 alle 22 24 42

Slate: 0.55.2
Browser: Firefox
OS: Mac

What's the expected behavior?

slate should select the word, not the whole paragraph

@sirgru
Copy link

sirgru commented Dec 24, 2019

Just discovered this issue myself. In Firefox, anchor and cursor do not always return the path of the inner node when double clicking. Instead the paths seems to bleed into the previous/next node, What I've found is sometimes the selection works properly with manual drag.

@cvlmtg
Copy link
Contributor Author

cvlmtg commented Dec 24, 2019

@sirgru yes, that should be fixed by #3374

@dylans
Copy link
Collaborator

dylans commented Mar 20, 2022

This has a potential fix in #3374, but it was never finished. If someone wants to revisit I suggest starting there. Thanks.

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