Bug: Can't move cursor to the end of the line that ends with an inline element followed by a single character
See original GitHub issueDo you want to request a feature or report a bug?
Bug
What’s the current behavior?
When there is an inline element followed by a single text character at the end of a line, it’s impossible to move the cursor past the last character using the arrow keys. This can be seen on the rich text example by deleting everything except the first line and trying to go past the exclamation point:
https://www.slatejs.org/examples/richtext
In the GIF, I’m only able to move past the exclamation point by using end
or by leaving an extra character (at the end I left a space)
Slate: 0.59.0 Browser: all OS: Mac
What’s the expected behavior?
Cursor should be able to go past the last character
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:11 (2 by maintainers)
Top Results From Across the Web
How to move cursor to end of contenteditable entity
This solution is for moving the caret to the end of a contenteditable element. It should work in all browsers which support contenteditable....
Read more >CodeMirror 5 User Manual
Move the cursor one character right, going to the next line when hitting the end of line. goColumnLeft: Move the cursor one character...
Read more >Inline elements - HTML: HyperText Markup Language | MDN
In this article, we'll examine HTML inline-level elements and how they differ from block-level elements.
Read more >TextView - Android Developers
android:digits, If set, specifies that this TextView has a numeric input method and that these specific characters are the ones that it will...
Read more >2 PL/SQL Language Fundamentals - Oracle Help Center
The byte representation of a single character is called a character code. ... end-of-line characters, which means that a single-line comment ends when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just make your intialValue the below (empty text node between mentions) and your issue should go away.
I don’t know if that’s the same issue, but please have a look at the following video:
https://user-images.githubusercontent.com/571589/114441984-55336f80-9bcc-11eb-97d7-7a6ba27e09e9.mov
When I refresh the page with some initial content I try to navigate the cursor with my arrow keys between and after the adjacent void elements and it doesn’t work. (as shown in the video)
After interacting with the editor, however, it works
I am not sure if this issue is related or not but I seemed familiar. Please tell me if I should create a new one or not.
initialValue