Open Bug 1496769 Opened 3 years ago Updated 4 months ago

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

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

Tracking Status
firefox64 --- affected

People

(Reporter: zjz, Unassigned)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

Attached file test.html
Please see the uploaded test.html
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
Also faced this issue, reproduced here: https://jsfiddle.net/webpadawan/g6vku9L3/
Depends on: 1512043
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)
Component: DOM → DOM: Core & HTML
Duplicate of this bug: 1714286
You need to log in before you can comment on or make changes to this bug.