Caret disappears & unable to type when contenteditable last child is not textNode
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox71 | --- | affected |
People
(Reporter: vsync.design, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [h2review-noted])
Attachments
(1 file)
807 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
Steps to reproduce:
I've made a demo showing there is no caret inside the contenteditable (when focused), if that contenteditable holds a tag inside it, and there isn't any textNode after that tag. (works on Chrome).
The element inside the first contenteditable has a disabled "contenteditable" property on purpose, so it could be deleted as a whole when "backspace" is pressed, and not be edited, because it's function is a "tag".
Tested on Windows10, FF version: 70.0b14 (64-bit)
https://jsbin.com/zexomiv/edit?html,css,output
Actual results:
First example:
- Caret does not show when clicking inside the "empty" area of the contentedtiable.
- Cannot type anything either.
Second example:
- Has textNode at the end of the contenteditable element, which shows the caret on focus and allows typing text.
- When placing the caret at the end and hitting "backspace" a few times, all the text is deleted, up until the tag inside the contenteditable. it should also get deleted (as in Chrome) but it refuses to be removed from the DOM using backspace. Only gets deleting using select-all (CTRL+A) and then hitting the backspace key.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Description
•