Open Bug 1910088 Opened 7 months ago Updated 3 days ago

Clearing contenteditable element with negative margin within a shadowdom causes other elements to disapear

Categories

(Core :: DOM: Editor, defect)

Firefox 130
defect

Tracking

()

Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- affected
firefox128 --- wontfix
firefox129 --- wontfix
firefox130 --- fix-optional
firefox131 --- fix-optional

People

(Reporter: matthias, Unassigned, NeedInfo)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Attached file demo.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Steps to reproduce:

Clearing a contenteditable element (removing the text by either pressing crtl+x or pressing backspace/delete on the empty input), causes all other children of the same parent to disapear, if the parent element is set to display:flex only prior elements will disapear.

Multiple conditions are required for this to happen:

  • the contenteditable element has to be part of a shadow dom
  • the contenteditable element has negative margin
  • other elements are only affected when the field is cleared with ctrl+x or the field is empty when attempting to delete text

Actual results:

Other elements disappear/get shifted by the amount of the negative margin

Expected results:

Nothing should disappear

Please move if this is not the right product/component.

Component: Untriaged → DOM: Editor
Product: Firefox → Core

Hi Daniel,
I got this regression window - https://phabricator.services.mozilla.com/D187241
Can you please take a look? Thank you.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dholbert)
Keywords: regression
Regressed by: 1802466

Set release status flags based on info from the regressing bug 1802466

:canadahonk, pinging as triage owner if this could be triaged for severity?

Flags: needinfo?(omedhurst)

S3 particularly given that it requires several conditions. Daniel, please adjust if you have a different opinion.

Severity: -- → S3
Flags: needinfo?(omedhurst)

I'm away for a couple weeks, but can take a look when I'm back.

I did take a quick look just to be sure I can reproduce the bug and can confirm the regression range (yes on both).

My steps to reproduce are:
(1) Load attached testcase ( https://bugzilla.mozilla.org/attachment.cgi?id=9416261 )
(2) Double-click the "asdf" text near the middle
(3) Press backspace.
EXPECTED RESULTS: Only asdf should disappear.
ACTUAL RESULTS: All of the text before asdf disappears as well.

Set release status flags based on info from the regressing bug 1802466

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: