Editor's selection points to non-existing location when value is changed programmatically (Chrome, Safari)
See original GitHub issueDo you want to request a feature or report a bug?
Bug.
What’s the current behavior?
https://codesandbox.io/s/slate-reproductions-forked-lzc7g?file=/index.js
- Focus the last paragraph in the example
- Click “Reset” button
useSlate().selection
points to a non-existing location (location after performing step (1))
Slate: 0.58.4 Browser: Chrome, Safari OS: Windows, Linux, Mac
What’s the expected behavior?
useSlate().selection
points to an existing location.
Works fine in Firefox.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Editing Code to Change Your Webpage - Apple Developer
Add the position property by entering position: fixed; Press Command-S to save the file with the new position property. You can save any...
Read more >Open Safari / Google Chrome developer tools ...
I need solutions for both Google Chrome and Safari, that will open the developer-tools pane if it's not already open, and (hopefully, if...
Read more >FCKeditor ChangeLog - What's New?
InsertHtml() will now insert to the last selected position after the user has selected ... It will move the focus out of the...
Read more >Jitbit Helpdesk - release history
"Big" support widget script - support for pre-selected ticket category ... UI when a project is changed; DevOps integration now supports rich text...
Read more >Customizing and Extending IBM Content Navigator
plug-in with basic extension points of IBM Content Navigator” which covers ... Look up the choice list values for a property or dependent...
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
@e1himself on a second thought, it might not be necessary to distinguish those, but I’m still worried that it’ll be already too late and the editor would’ve crashed by then, since the value would’ve been applied already.
@e1himself yep, I think that’s the problem with that fix, I don’t think there a good way to tell which is which.
@kamilmielnik in our case we have quite a few places where we’re accessing the selection, so checking everywhere would be a little messy 😕 thx for sharing though!