[Discussion] By arrow key movement, the cursor should be able to reach the inline end.
See original GitHub issueDo you want to request a feature or report a bug?
feature Relate to https://github.com/ianstormtaylor/slate/pull/1582
What’s the current behavior?
If I am not wrong, the onSelect
skip the inline end because the mouse click in some browsers cannot catch the inline end. But the logic of key input, which is decided by packages/slate
slate core codebase, is consistent crossing browsers. We should normalize the selection
when and only when the mouse click happens.
I think we should provide is{Something}VisiblyTheSame
for on{Event}
. These methods are designed to
- If the computed slate variable is not significantly different from the existing range in the slate value, then do not normalize
- if normalize, we would prefer the range closer to the existing range in slate value
- otherwise, use the normalized range
Then we still have consistent behavior between browsers, and we can have the cursor at the end of inline to insert and delete.
Issue Analytics
- State:
- Created 6 years ago
- Comments:19 (14 by maintainers)
Top Results From Across the Web
Arrow keys started highlighting text - Microsoft Community
Normal behavior for a keyboard is arrow keys move cursor on text, if the Shift key is pressed using arrow keys text is...
Read more >What is a function to have arrow keys move cursor? - SitePoint
Hi Angela and welcome to the JavaScript forums. It just means that it was posted in the wrong place at the end of...
Read more >Navigating and Selecting With the Keyboard - LibreOffice Help
Navigating and Selecting With the Keyboard ; Up, down arrow keys. Moves the cursor up or down one line. (Command+OptionCtrl+Alt) Moves the current...
Read more >Accessibility: How can I set the position of the cursor in the ...
Navigation is possible with arrow keys up, down, left and right. How can the cursor always be set to the right in the...
Read more >Keyboard Shortcuts in the IPython Shell | Python Data Science ...
The IPython shell doesn't go this far, but does provide a number of keyboard shortcuts for ... Ctrl-b or the left arrow key,...
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 Free
Top 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
In firefox the behavior depends on how the selection was obtained:
|<aaa><bbb> -> <aaa|><bbb>
<aaa><bbb>| <- <aaa><|bbb>
I even tried IE11 just out of intereset:
Hi, not sure if it helps somehow, but I tried to briefly test the default behavior of
contenteditable
on Chrome, what I found out:In conclusion:
Could we preventDefault all insertions and perform them manually?