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

Issue 826406 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Executing "insertunorderedlist" while selecting a contenteditable element inside a shadow dom works different compared to non-shadow dom

Reported by tvanderl...@gmail.com, Mar 27 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36

Steps to reproduce the problem:
1. Create an element with a shadow dom
2. In the shadow dom, create an element with contenteditable
3. Select all text in the contenteditable element
4. Execute "insertunorderedlist" (a couple of times)

In the supplied test case the first text is without shadow dom, while the second text is within shadow dom.

What is the expected behavior?
The behavior is the same as in the non-shadow dom version, it create 3 bullet points for each line or removes all bullet points from all lines.

What went wrong?
Instead it first creates a bullet point for the first and third line. Executing again creates bullet points for all lines. Executing again removes the bullet point for first and third, but keeps it on the second line. Then it alternates between the last two states.

Note that there are also a lot of empty text nodes inserted in the dom.

Did this work before? No 

Does this work in other browsers? No
 Safari hangs, other browsers do not have native shadow dom

Chrome version: 65.0.3325.181  Channel: stable
OS Version: 10.0
Flash Version:
 
contenteditable.html
926 bytes View Download

Comment 1 by dfreedm@google.com, Mar 27 2018

Cc: kochi@chromium.org

Comment 2 by hayato@chromium.org, Mar 28 2018

Components: -Blink>DOM Blink>Editing
Labels: Needs-Triage-M65

Comment 4 by yosin@chromium.org, Apr 2 2018

Components: -Blink>Editing Blink>Editing>Command
Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)

Sign in to add a comment