Closed Bug 1867055 Opened 2 years ago Closed 2 years ago

No caret is displayed.

Categories

(Core :: DOM: Editor, defect)

Firefox 122
Desktop
Windows 10
defect

Tracking

()

VERIFIED FIXED
122 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox120 --- unaffected
firefox121 --- unaffected
firefox122 + verified

People

(Reporter: alice0775, Assigned: sefeng)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(1 obsolete file)

On latest autoland, the following bug appears on Windows10 and Ubuntu22.04. (Not tested on macOS).

Steps to reproduce:

  1. Open data:text/html,<iframe src="data:text/html,<textarea>this is textarea</textarea>"</iframe>
  2. Focus the textarea

OR

  1. Open data:text/html,<iframe src="data:text/html,<div style='border:solid 1px black; height:100px;' contentEditable='true'>this is contentEditable</div>"</iframe>
  2. Focus the contenteditable

Actual results:
No caret is displayed.

Expected results:
Caret should be displayed

Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=42486b4cf0abed8107b66eab8bab88bde0fe8072&tochange=b72b6773b51448682d4a42ccfba6a6f5b0eeec8e

Regressed by: 1860328
Summary: caret misses when dragging and dropping → No caret is displayed.

Yeah seems we should probably move the caret handling to EnterPresShell / LeavePresShell. Surprised no test caught comment 0...

Flags: needinfo?(sefeng)

In bug 1860328, we updated the code to set mCaretFrame for the
root presShell, instead of getting the current focused pres shell.
Apparently this is problematic when the caret is in a sub document.
So instead, we use nsDisplayListBuilder::EnterPresShell to make
sure sub pres shells can also create the carets.

Assignee: nobody → sefeng
Status: NEW → ASSIGNED
Attachment #9365928 - Attachment is obsolete: true

Setting 122 to Fixed and resolving, the regressor was backed out of autoland and never landed in central

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(sefeng)
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Flags: qe-verify+

Reproduced the issue with the build from 1860328#c12 on Windows 10x64 and test cases from comment 0. No caret is displayed.
The issue is verified fixed with Firefox 122.0b7 on Windows 10x64, macOS 12 and Ubuntu 22. The caret is correctly displayed.

Status: RESOLVED → VERIFIED
Has STR: --- → yes
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: