Content-editable element does not match :read-write if it is newly created and haven’t yet been appended to the DOM tree
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: kazz, Unassigned)
Details
(Keywords: parity-chrome)
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Steps to reproduce:
- open the attached html file
- check the output result
Actual results:
Detached:
div.matches(':read-write'): expected: true, actual: false.
Expected results:
Detached:
div.matches(':read-write'): expected: true, actual: true.
Chrome outputs div.matches(':read-write'): expected: true, actual: true.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•1 year ago
|
Comment 2•1 year ago
|
||
The issue only occurs with newly created elements that haven’t yet been appended to the DOM tree. Once the element is appended to the tree, it continues to work even if it’s later detached.
It looks like this is because the editable state depends on Element::BindToTree to be updated properly.
Updated•1 year ago
|
Updated•1 year ago
|
Description
•