New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676679 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug

Blocked on:
issue 675727



Sign in to add a comment

Deleting selection removes extra node with "-webkit-user-modify" style

Project Member Reported by chongz@chromium.org, Dec 22 2016

Issue description

Chrome Version:  55.0.2883.95
OS: macOS 10.12.2 (but should be All)

What steps will reproduce the problem?
(1) Go to https://jsbin.com/zezowoz
(2) Select "123"
(3) Hit backspace key on keyboard
(4) Observe result

What is the expected result?
"123" get deleted and "Barrier" stays.

What happens instead?
Both "123" and "Barrier" are deleted.


The root cause is:
1. Blink calls |CompositeEditCommand::removeNodePreservingChildren()| after deleting selection;
2. |removeNodePreservingChildren()| tries to removed <div>s with no siblings & no attributes (children will be deleted & re-attached to parent);
3. The child with "<style>* {-webkit-user-modify: read-write;}</style>" got deleted but failed to be re-inserted as the parent has lost editable attribute right after the deletion.

We need to decided what should be the appreciate behavior:
1. Keep current behavior
  * Reasoning: We should insert node to non-editable containers
2. Force re-attaching children during |removeNodePreservingChildren()|
  * Reasoning: Good for UX
3. Don't call |removeNodePreservingChildren()| if children contains "-webkit-user-modify" style
  * Reasoning: Good for UX and might be less harmful than 2

Notes:
This also caused crash on  issue 675727 .

 
deleting-123-removes-all.html
108 bytes View Download
Status: Available (was: Untriaged)
Project Member

Comment 2 by sheriffbot@chromium.org, Feb 15 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by yosin@chromium.org, Feb 19 2018

Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)

Sign in to add a comment