a contenteditable element inside an element with tabindex(which is inside a Shadow DOM), fails to display the caret when the focus is changed inbetween shadow elements

NEW
Unassigned

Status

()

defect
P3
normal
8 months ago
2 months ago

People

(Reporter: zjz, Unassigned)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox64 affected)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 months ago
Posted file test.html
Please see the uploaded test.html
(Reporter)

Comment 1

8 months ago
Since the bug is relevant to both the contenteditable feature and the shadow DOM, so I am CC'ing both of you.
Blocks: 97284, shadowdom
Editor initializes caret/selection at receiving focus event. So, the editable element does not receive focus event or the focus event listener of editor is not shadow DOM aware.
Priority: -- → P3

Comment 3

6 months ago
Also faced this issue, reproduced here: https://jsfiddle.net/webpadawan/g6vku9L3/

Updated

5 months ago
Depends on: 1512043

Updated

5 months ago
No longer depends on: 1512043
In the "move-focus to the inner element inside the shadow DOM" case, in all browsers, there's no extra focus event dispatched.

So editor should probably use a different method other than regular event listeners in order to handle this.
Olli, do we have an easy way to somehow end up dispatching the focus event here at least for the system event handlers? Or should we just move that focus event handler to get notified via nsFocusManager instead or such?
Flags: needinfo?(bugs)
See Also: → 1489440

If listener is added to chrome event handler, it should get the event. And listener could then use composedTarget

Flags: needinfo?(bugs)
(Assignee)

Updated

2 months ago
Component: DOM → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.