Skip to content

Commit

Permalink
part 6: Make `AutoEmptyBlockAncestorDeleter::ScanEmptyBlockInclusiveA…
Browse files Browse the repository at this point in the history
…ncestor` treat non-editable content as visible

It treats non-editable content as invisible. Therefore, if you try to
delete backward/forward from first/last block, Gecko deletes the block with
the non-editable content.

Depends on D196817

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

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1870222
gecko-commit: b9600c5aa59e300200656691d1f1997593caafbd
gecko-reviewers: m_kato
  • Loading branch information
masayuki-nakano authored and moz-wptsync-bot committed Dec 26, 2023
1 parent ac62cd2 commit 97c043b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions editing/data/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -3095,4 +3095,10 @@ var browserTests = [
"<p><span contenteditable=\"false\">abc</span></p>",
[true],
{}],
// Do not delete ancestor blocks which still has non-editable content
["<p>{}<span contenteditable=false>ab</span></p>",
[["delete",""]],
"<p><span contenteditable=\"false\">ab</span></p>",
[true],
{}],
]
6 changes: 6 additions & 0 deletions editing/data/forwarddelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2975,4 +2975,10 @@ var browserTests = [
"<p><span contenteditable=\"false\">abc</span></p>",
[true],
{}],
// Do not delete ancestor blocks which still has non-editable content
["<p><span contenteditable=false>ab</span>{}</p>",
[["forwarddelete",""]],
"<p><span contenteditable=\"false\">ab</span></p>",
[true],
{}],
]

0 comments on commit 97c043b

Please sign in to comment.