-
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
bug with selection around inline void node edges #710
Comments
@AlexeiAndreev Hi. Could you check your example with the last version of Slate. You can just open your link and try to reproduce errors. |
Oh apparently I didn't click the "Update button" when I forked. This should be updated: https://jsfiddle.net/f2t6vd6z/1/ |
@AlexeiAndreev Thank you. Currently, I see 😊 Uncaught DOMException: Failed to execute 'setStart' on 'Range': The offset -1 is larger than or equal to the node's length (1).
at Content.updateSelection (https://npmcdn.com/[email protected]/dist/slate.js:32587:11)
at Content.componentDidUpdate (https://npmcdn.com/[email protected]/dist/slate.js:32507:12)
at measureLifeCyclePerf (https://npmcdn.com/[email protected]/dist/react-dom.js:4529:12)
at https://npmcdn.com/[email protected]/dist/react-dom.js:5183:11
at CallbackQueue.notifyAll (https://npmcdn.com/[email protected]/dist/react-dom.js:948:22)
at ReactReconcileTransaction.close (https://npmcdn.com/[email protected]/dist/react-dom.js:11398:26)
at ReactReconcileTransaction.closeAll (https://npmcdn.com/[email protected]/dist/react-dom.js:14790:25)
at ReactReconcileTransaction.perform (https://npmcdn.com/[email protected]/dist/react-dom.js:14737:16)
at ReactUpdatesFlushTransaction.perform (https://npmcdn.com/[email protected]/dist/react-dom.js:14724:20)
at ReactUpdatesFlushTransaction.perform (https://npmcdn.com/[email protected]/dist/react-dom.js:12844:32) |
Yes. And note how strangely the cursor moves. Sometimes it skips characters. |
Wanted to cross reference a similar issue with the Medium editor. This is probably a separate issue, but apparently similar errors can be caused by certain browser extensions that automatically alter your input. I was able to reproduce this error using this plugin. Edit: Draft-js seems to just accept that |
i think you used table in html. and i don't know as it works but simple solution is wrap ckeditor to table, sample: |
This issue hasn't had a response in a while, and it's unclear if it's still present in the latest versions of Slate. To keep the issues easier to manage, since there are so many being opened every day, I'm going to close this old one out. But if you notice that the bug is still happening, please feel free to comment and it can be revisited. It might be an edge case that not many people run into, in which case the fastest way to get it fixed would probably be to write a pull request for it. Thanks for understanding! |
Here is the JSFiddle: https://jsfiddle.net/f2t6vd6z/
Basically I'm inserting an inline node (IfStatement) that has a few Void nodes inside it. After insertion, if you just click Left to go character by character, you'll see errors. It's not clear if I'm doing something incorrectly or if this is a bug.
The text was updated successfully, but these errors were encountered: