-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
decorated text cannot be selected (#3118 re-open) #3309
Comments
I was just about to post an issue related to this, not sure if its related to selecting decorated text. I get the following errors very frequently:
It sometimes happens after a user clicks in the editor. I know this from my error reporting which reports clicks. I can't reproduce yet, (only noticing in analytics) but it seems to happen more frequently (but not entirely) with mobile Android devices, (including Chrome Mobile 77.0.3865, Amazon Silk 73.7.5, Mobile Safari 13.0.3, Chrome Mobile 78.0.3904). I've had this occur on 0.50, 0.52 and 0.54. (I keep updating hoping this issue will resolve) I'll keep trying to reproduce and update as I find more information. |
I think there are 2 issues. Since the Slate refactoring, the 1st issue when selecting of decorated text, also leads to raise the 2nd issue. |
I've inserted a GIF. |
Also having this issue |
I found a work-around, setting "contentEditable={false}" for the decoration elements.
|
+1, I am getting similar error. Details on this: Description: Expectation: Environment: Slate Version: No idea as this is happening in third party website |
This problem is ongoing. |
The problem persists |
The problem remains |
The same problem occurred last 3 week |
This error occurs for me during the This causes setDomSelection to be called, where the subcalls to ReactEditor.toDOMRange and subsequently ReactEditor.toDOMPoint fail to resolve the selection via the dom, as the element with that offset no longer exists. I think the fix here would be to either:
|
Issue #3118 was unfortunately not corrected by #3093, so I open this new issue, as suggested.
I wrote a new index.jsx (renamed index.txt because github does not accept .jsx) compliant with the new architecture of Slate.
The behaviour remains the same : after rendering a decoration (that looks ok in the browser) the text cannot be selected anymore. The cursor automatically moves to the end of the text. (see screen record #3118)
Moreover, when the cursor reaches the end of the text, the script raises an error : "Error: Cannot resolve a DOM point from Slate point: {"path":[0,0],"offset":33}"
The browser is Firefox and Slate is 0.53.0
The text was updated successfully, but these errors were encountered: