Inline void elements cannot be deleted when selected
See original GitHub issueDo you want to request a feature or report a bug?
This is a bug report
What’s the current behavior?
You can reproduce this easily on the Slate mentions example. Go here: https://www.slatejs.org/examples/mentions
Click one of the mentions so that it’s highlighted with the custom rounded blue border. Now press backspace or delete. You can’t delete it when it is selected. If you press right arrow and then backspace it will work fine.
It seems that block voids work, since examples/images
works fine.
Slate: 0.57.1 Browser: Version 79.0.3945.117 (Official Build) (64-bit) OS: macOS 10.15.1 (19B88)
What’s the expected behavior?
I would expect that pressing delete would delete the mention.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:18
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Are (non-void) self-closing tags valid in HTML5?
According to the HTML5 spec, tags that cannot have any contents (known as void elements) can be self-closing*. This includes the following tags:...
Read more >Memory Management, C++ FAQ - Standard C++
This is an opportunity to forget to delete that object. After all, we cannot tell just looking at pointer whether it needs to...
Read more >How whitespace is handled by HTML, CSS, and in the DOM
An inline element (the <span> , which contains a space, and the word "World!"). Another text node (consisting only of tabs and spaces)....
Read more >Deleting IAM policies - AWS Identity and Access Management
Select the check box next to the customer managed policy to delete. You can use the search box to filter the list of...
Read more >HTML Standard
Certain invalid syntax constructs, when parsed, result in DOM trees that are highly ... For example, a button element cannot contain a textarea...
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
@laverdet @skogsmaskin I was able to fix this last image issue by doing the following in my
withImages
plugin:We just delete the last image in the selection and leave the rest to Slate
seems to be a browser specific issue, it’s working in Firefox for Mac.