Open Bug 1602292 Opened 4 years ago Updated 2 years ago

Content disappears from contenteditable under certain circumstances

Categories

(Core :: DOM: Editor, defect, P3)

71 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: michel.richter, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363

Steps to reproduce:

  1. My contenteditable looks like this:
    (note 'missing' line-breaks. They actually matter)

<div contenteditable="true"><div><p>
<span>Text1</span><span >, </span><span>Text2</span></p>
<p><span>Paragraph2</span></p></div></div>

  1. I select whole first line and some part of the second line.
  2. I make any input (including Backspace, Delete, Paste and Cut)

Actual results:

The whole text disappears from the contenteditable div. The inserted character (if any) does not appear.

If the inner div is removed, only the selected text will disappear. But the input will still not appear.

Note:
The issue will not occur when inserting line breaks after every HTML-element. It has to be formatted like above (or completely minified) to produce the bug.

Expected results:

Only the selected text should be removed and the input character should appear in its place.
Minification of html code should not change behavior of the browser.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → DOM: Editor
Product: Firefox → Core
Priority: -- → P3
Severity: normal normal → S3 S3
You need to log in before you can comment on or make changes to this bug.