Closed Bug 1665167 Opened 5 years ago Closed 2 years ago

[meta] Bug 685445 has regressed (Contenteditable=false elements in contenteditable=true elements cannot be deleted by using Backspace/Delete)

Categories

(Core :: DOM: Editor, task)

7 Branch
task

Tracking

()

RESOLVED DUPLICATE of bug 1873155
Tracking Status
firefox80 --- affected
firefox81 --- affected
firefox82 --- affected

People

(Reporter: emilio, Assigned: m_kato)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: meta)

Attachments

(4 obsolete files)

+++ This bug was initially created as a clone of Bug #685445 +++

I can reproduce the issue using the test-case in the bug.

Makoto, it seems you fixed bug 1394758, is there any chance you could take a look?

(see above)

Flags: needinfo?(m_kato)

additional test case/simple codepen, https://codepen.io/burritoiand/pen/xxVJdaL, try deleting the text in FireFox, thanks!

See Also: → 1665089

Hi, I tried to get a regression range for this issue by using the steps from Comment 2 but it seems to be happening all the way down to Fx 43. I will remove the regression window flag.

I look this.

Assignee: nobody → m_kato
Summary: Bug 685445 has regressed (Contenteditable=false elements in contenteditable=true elements cannot be deleted by using Backspace) → Bug 685445 has regressed (Contenteditable=false elements in contenteditable=true elements cannot be deleted by using Backspace/Delete)
Flags: needinfo?(m_kato)

Even if non-editable node, DeleteNodeWithTransaction should be able to
remove it if parent is editable.

Example, <div contenteditable><img contenteditable=false /></div> should
allow to remove <img> element by backspace key.

Depends on D92582

Actually, we handle non-editable node as special node like <img>.

WSRunObject scans text node for white space handling, and reason content is
sometimes leaf node (text node). But since we use reason content for
HandleDeleteAtomicContent, we cannot remove it due to non-editable and we
don't know whether this leaf (and this non-editable tree) are removable.

So we would like to change reason content from leaf node of non-editable to
topmost non-editable node if possible.

Also, using [Delete] key still use frame selection, so WSRunObject don't still
consider this situation yet. And actually we don't support deep complex
case (see test case) yet since Chrome doesn't remove any elements on this
test case.

Depends on D92586

https://searchfox.org/mozilla-central/rev/35245411b9e8a911fe3f5adb0632c3394f8b4ccb/editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/delete.py#264-267 etc are incorrect for current behaviour.

browserscope isn't active project, so there is no way to feedback this.

Depends on D92587

Depends on: 1670531

selection issue is moving to bug 1670531 since editor uses nsFrameSelection for backspace/delete.

Depends on: 1673816
Attachment #9179852 - Attachment is obsolete: true
Depends on: 1675779
Depends on: 1694255
Attachment #9179858 - Attachment is obsolete: true
Attachment #9179856 - Attachment is obsolete: true
Attachment #9179857 - Attachment is obsolete: true
Keywords: meta
Summary: Bug 685445 has regressed (Contenteditable=false elements in contenteditable=true elements cannot be deleted by using Backspace/Delete) → [meta] Bug 685445 has regressed (Contenteditable=false elements in contenteditable=true elements cannot be deleted by using Backspace/Delete)
Type: defect → task
Blocks: 1483455
Depends on: 1713064
Severity: normal → S3

The remaing bugs should be handled in bug 1873155.

See Also: → contenteditable-false
Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: contenteditable-false
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: