Closed Bug 1628770 Opened 4 years ago Closed 4 years ago

Empty div in contenteditable=true blocks are visible

Categories

(Core :: DOM: Editor, defect)

76 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- fixed
firefox77 --- fixed

People

(Reporter: bob, Assigned: emilio)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(4 files)

Attached file Test case

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

Steps to reproduce:

When I edit some document using ckeditor.

Actual results:

All the empty divs are visible and use space

Expected results:

Empty divs should collapse as before.

Attached image div visible
Attached image Firefox 75, no bug
Component: Untriaged → DOM: Editor
Product: Firefox → Core

Using mozregression I found Bug 1098151

2020-04-09T18:10:30: INFO : Narrowed integration regression window from [39e8040f, 0bd7ed7c] (3 builds) to [39e8040f, 66e5251c] (2 builds) (~1 steps left)
2020-04-09T18:10:30: DEBUG : Starting merge handling...
2020-04-09T18:10:30: DEBUG : Using url: https://hg.mozilla.org/integration/autoland/json-pushes?changeset=66e5251cc1e291fbd2196008433e5248602aa9e9&full=1
2020-04-09T18:10:32: DEBUG : Found commit message:
Bug 1098151 - Make empty editable blocks at least one line-height tall. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D68586

2020-04-09T18:10:32: DEBUG : Did not find a branch, checking all integration branches
2020-04-09T18:10:32: INFO : The bisection is done.
2020-04-09T18:10:32: INFO : Stopped

Status: UNCONFIRMED → NEW
Has Regression Range: --- → yes
Has STR: --- → yes
Ever confirmed: true
OS: Unspecified → All
Hardware: Unspecified → All

Confirmed on Mac OSX latest nightly

Emilio, it seems that your patch in bug 1098151 caused this regression, could you have a look please? Thanks

Flags: needinfo?(emilio)
Keywords: regression
Regressed by: 1098151

Yeah, so... bug 1098151 was intentional because I didn't want to treat blocks differently depending on their DOM position... But it seems that other browsers do exactly that, so oh well.

Assignee: nobody → emilio
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2ea41c3546d3
Restrict "empty editable block" bits to contenteditable roots. r=jfkthame
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/22849 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
Upstream PR merged by moz-wptsync-bot

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Comment on attachment 9139557 [details]
Bug 1628770 - Restrict "empty editable block" bits to contenteditable roots. r=jfkthame

As annoying as I always find the bot, in this case it's spot on.

Beta/Release Uplift Approval Request

  • User impact if declined: comment 0
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Very simple tweak to a behavior change introduced in 76 to be more compatible with other UAs.
  • String changes made/needed: none
Flags: needinfo?(emilio)
Attachment #9139557 - Flags: approval-mozilla-beta?

Comment on attachment 9139557 [details]
Bug 1628770 - Restrict "empty editable block" bits to contenteditable roots. r=jfkthame

Approved for 76.0b5.

Attachment #9139557 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: