Closed Bug 1248186 Opened 8 years ago Closed 7 months ago

Caret disappears in [contenteditable] element if I press Right arrow at the end of text

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED FIXED
119 Branch
Tracking Status
firefox47 --- wontfix
firefox48 --- wontfix
firefox49 --- wontfix
firefox50 --- wontfix
firefox51 --- wontfix
firefox-esr68 --- wontfix
firefox-esr102 --- wontfix
firefox-esr115 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox117 --- wontfix
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: arni2033, Assigned: pommicket)

References

()

Details

(Keywords: regression)

Attachments

(2 files)

>>>   My Info:   Win7_64, Nightly 47, 32bit, ID 20160210071115
STR:
1.   Open the following "data:" url or click URL in the form above
>   data:text/html,<div class="declaration"><span></span><span class="value" contenteditable="">linear-gradient(to left, red, blue, green, yellow), url(test.png)</span> <span></span></div>
2.   Click on the text on that page  (preferably - between "s" and "t" in word "test")
3.A) Hold Right arrow for several seconds
3.B) Press Right arrow 6 times  (if you followed advice in Step 2)

AR:  Caret disappears. Looks like it just leaves [contenteditable] element
ER:  Caret should be displayed at the end of text in [contenteditable] element

This is regression from bug 669026. I'm not sure, so leaving "regressionwindow-wanted" keyword.
Regression range:
> http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=c5b90ea7e475&tochange=f63a99195987
Your suspected bug looks highly likely to be the culprit, yes.
Flags: needinfo?(bugs)
jet, we'd like to get this fixed but we're getting it off the 47 tracking lists.
Depends on: 1277113
Flags: needinfo?(bugs)
Fairly minor regression since 2011. It would be nice to fix but we are not going to track it.
See Also: → 1581561
See Also: → 435967

notes (and workaround):

  • the contenteditable is not affected when it has a border
  • also when when it is the last child, hence the . in this proof of concept:
data:text/html,<div><span contenteditable="" style="border: 1px solid black">edit me!</span>.</div>
Severity: normal → S3

Adjust nsFocusManager::GetSelectionLocation so that
it handles the case of moving to the end of a contenteditable
(previously only handled form controls)

Assignee: nobody → pommicket
Status: NEW → ASSIGNED

This patch shouldn't change behavior. It just removes a lot of noise
from that function.

In particular, it simplifies various conditions that can't happen, like
startNode being a text-node but a form control at the same time, or a
text-node and the root element.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6fd2f0219394
Preliminary clean-up of nsFocusManager::GetSelectionLocation. r=masayuki
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch

Just landed the preparation patch.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/920e4f82b348
prevent focus loss at end of [contenteditable] r=masayuki
Status: REOPENED → RESOLVED
Closed: 8 months ago7 months ago
Resolution: --- → FIXED

The patch landed in nightly and beta is affected.
:pommicket, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox119 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(pommicket)

This is a rather long-standing bug, we can let it ride the trains since the patch isn't super-trivial either.

Flags: needinfo?(pommicket)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: