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

Cannot resolve a Slate point from DOM point #3723

Open
ncqwer opened this issue Jun 5, 2020 · 3 comments · May be fixed by #5407
Open

Cannot resolve a Slate point from DOM point #3723

ncqwer opened this issue Jun 5, 2020 · 3 comments · May be fixed by #5407

Comments

@ncqwer
Copy link

ncqwer commented Jun 5, 2020

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

bug

What's the current behavior?

Under the situation that if a normally parent element's children are all void element,clicking the area(contenteditable=false) that belong to parent element and multiple times will result in an error(Cannot resolve a Slate point from DOM point: [object Text],17)

here is the exmaple:
example
Jun-05-2020 17-20-30
The bug doesn't happen each time.

Slate: 0.58.1
Browser: Chrome
OS: Mac

What's the expected behavior?

No error occured!

@maebert
Copy link

maebert commented Jun 16, 2020

Probably the same issue as #3421.

TL;DR every element that has contentEditable={false} should also have style={{ userSelect: 'none' }} to avoid this issue.

@williamtstanley
Copy link

williamtstanley commented Sep 21, 2020

I am getting this behaviour even with user-select: none in the styles. Seems to be related to blocks that only have a void nodes in them.

@gorpher
Copy link

gorpher commented Jan 16, 2021

Probably the same issue as #3421.

TL;DR every element that has contentEditable={false} should also have style={{ userSelect: 'none' }} to avoid this issue.

good idea.
it's solved,thanks.

williamstein added a commit to sagemathinc/cocalc that referenced this issue Jan 16, 2021
@zbeyens zbeyens linked a pull request Apr 27, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants