Closed Bug 1690502 Opened 3 years ago Closed 3 years ago

contentEditable cursor displayed in wrong place when at end of text node, after newline

Categories

(Core :: DOM: Editor, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1712834

People

(Reporter: marijnh, Assigned: saschanaz)

References

Details

Attachments

(1 file, 1 obsolete file)

Setting the selection (with JavaScript) in an element like <pre contenteditable=true>one\n<br></pre> (where the \n is a plain newline) at offset 4 in the one\n text node causes it to be displayed on the line with one. (Setting it at offset 1 in the <pre> node does produce the expected visual cursor position.)

Attached HTML file demonstrates the issue.

Attached file test.html

(Somehow, attaching files directly on bug creation either doesn't work, or is confusing me. This should actually add the file.)

Kagami, can you take a look, please?

Severity: -- → S3
Flags: needinfo?(krosylight)
Assignee: nobody → krosylight
Flags: needinfo?(krosylight)
See Also: → 1691574
Pushed by krosylight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73d1d559436a
Do not ignore the newline followed by <br> in <pre> r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/27562 for changes under testing/web-platform/tests

Oh no, that fix is about bug 1691574. Let's leave this open.

Keywords: leave-open

Comment on attachment 9202026 [details]
Bug 1690502 - Do not ignore the newline followed by <br> in <pre> r=emilio

Revision D104523 was moved to bug 1691574. Setting attachment 9202026 [details] to obsolete.

Attachment #9202026 - Attachment is obsolete: true
Upstream PR merged by moz-wptsync-bot

Fixed in:

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: