Open Bug 1929159 Opened 8 months ago Updated 7 months ago

Caret doesn't appear when taking a focus on design mode from a shadow

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

People

(Reporter: m_kato, Unassigned)

References

(Blocks 1 open bug)

Details

Step

  1. Open https://bug1920859.bmoattachments.org/attachment.cgi?id=9426979
  2. Click [design mode]
  3. Set focus to document

Result

Caret doesn't appear even if taking a focus. But when typing keyboard, it is inserted.

Expected Result

Show caret. I guess that editor or focus manager doesn't turn on caret.

Blocks: 1920859
See Also: 1920859
See Also: → 1238567

I could reproduce on 90, so it doesn't look like a recent regression.

Severity: -- → S3

The checkbox is in a shadow. In the design mode, shadow DOMs are not editable unless they have contenteditable in it. Therefore, if an element in the shadow has focus or selection range(s), HTMLEditor needs to keep hiding the caret. However, when (pseudo-)focus is moved from the shadow, i.e., I think Selection is moved into the light DOM, HTMLEditor or Selection needs to run the focus handling only in the design mode. I guess the best place is HTMLEditor::NotifySelectionChanged.

OS: Unspecified → All
Hardware: Unspecified → All
Summary: Caret doesn't appear when taking a focus on design mode → Caret doesn't appear when taking a focus on design mode from a shadow
You need to log in before you can comment on or make changes to this bug.