Open Bug 1837920 Opened 1 year ago Updated 1 year ago

contentEditable cursor displayed in wrong place when after newline

Categories

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

Firefox 114
defect

Tracking

()

People

(Reporter: marijnh, Unassigned, NeedInfo)

Details

Attachments

(1 file)

Attached file test.html

When the cursor is set in an editable element, at the end of a text node that ends in a visible newline, the cursor gets drawn before instead of after the newline.

If you open attached HTML file you can see it happen—the selection is set after the newline that follows "ab", but the browser shows a blinking cursor directly after the "ab" text.

This is very very similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1690502 , which was fixed in a way that solves the test submitted there, but not this slight variation on it. The problem only occurs when the extra code tag around the text is present—the case where that isn't was solved by the patch for issue 1690502.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Core & HTML' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Core & HTML
Product: Firefox → Core

Care to investigate, Jan? :)

Flags: needinfo?(jjaschke)

I wonder if this is related to Bug 1819551 which deals with line break shennanigans in contenteditable. I'll look deeper...

(keeping the ni?)

Severity: -- → S3
Flags: needinfo?(jjaschke)
Flags: needinfo?(jjaschke)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: