contentEditable element in a shadow root fails to show cursor when moving focus from another editable element
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
People
(Reporter: marijnh, Assigned: masayuki)
References
(Blocks 2 open bugs)
Details
Attachments
(1 file)
247 bytes,
text/html
|
Details |
When two contentEditable elements exist inside a shadow root, focusing one and then using the mouse to move focus to the other one, you can type in the newly focused element, but no cursor is visible.
Possibly related, moving from one editable element to another with the keyboard (tab) doesn't seem to work the way it works outside of a shadow root either—I can see the focus ring appear on the newly selected element, but typing (again without cursor) still happens in the one that was initially selected.
Comment 1•3 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 3•3 years ago
|
||
I see a different behavior on Windows: the typing doesn't work at all. I will investigate.
Updated•3 years ago
|
Comment 5•1 year ago
|
||
Unassigning myself from inactive bugs. Masayuki, could you take a look? Thanks!
Assignee | ||
Comment 6•1 year ago
|
||
This is caused by editor and focus manager have not supported shadow DOM tree yet.
When focused element is not in the shadow DOM, focus
event is fired on the document
with original target is the shadow host. Then, initializing selection which is computed from focus node of Selection
works, however, if focus is move in a shadow DOM, editor won't receive focus
event because focus node has not occurred from point of view of document
.
So we need to make nsFocusManager
notify HTMLEditor
of focus change directly and editor should stop using focus
and blur
event listeners.
Marijn Haverbeke: How much important this bug for you? Did you find this bug with experimenting something technically? Or did you find this with trying to create something which you want?
Assignee | ||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
Masayuki: I'm not Martin, but I've found this bug while investigating an internal product bug at my company, and found this to be the root cause.
Assignee | ||
Comment 8•1 year ago
|
||
(In reply to Niklas Keller from comment #7)
Masayuki: I'm not Martin, but I've found this bug while investigating an internal product bug at my company, and found this to be the root cause.
Thanks. It does not make this bug urgent, but it means that this prevents a useful use case of contenteditable
for some developers. And I check the source code briefly, it's hard to fix this with the ideal approach, i.e., making editor stop using focus
and blur
events. However, this could be fixable with lighter approach.
I try to fix this while waiting the pending reviews.
Comment 9•1 year ago
|
||
Redirect a needinfo that is pending on an inactive user to the triage owner.
:hsinyi, since the bug has recent activity, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Description
•