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

Issue metadata

Status: Fixed
Closed: Oct 2016
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment

chrome hangs on when creating bullet list in contenteditable

Reported by, Dec 21 2015

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36

Steps to reproduce the problem:
to see issue, run this html, also attached...

    <!-- the button with contenteditabla false will cause hang -->
    <div id='ce' contenteditable='true'>
        <p>line1<button contenteditable='false'>hello</button></p>
    <!-- oh snap - hitting this button will cause app to hang -->
    <button id='bulletButton'>hang chrome</button>
        var ceEl = document.getElementById('ce');
        document.getElementById('bulletButton').addEventListener('click', function() {
            // select all text in content editable element
            var range = document.createRange();
            var selection = window.getSelection();

            // turn into bullets - this line hangs chrome and never returns
            document.execCommand('insertUnorderedList', false, null);

What is the expected behavior?
should turn two lines into bullets

What went wrong?
hang, 100% cpu usage in both chrome/safari (mac and windows).

Did this work before? N/A 

Chrome version: 47.0.2526.106  Channel: stable
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 20.0 r0

looks similiar to but i couldn't not view link above for some reason
974 bytes View Download
Labels: -OS-Mac
Removing OS-Mac label per "mac and windows"
Labels: OS-All M-49 Cr-Blink-HTML Stability-Hang
Status: Untriaged
Able to reproduce this issue on Latest Stable# 47.0.2526.106 and Latest Canary# 49.0.2599.0 on Windows, Mac and Ubuntu.
This is a Non-Regression Issue existing from M30 build# 30.0.1549.0 (Official Build 208818) m.
Changing the status to Untriaged so that the issue could get addressed.
Thank You.

Comment 3 by, Dec 28 2015

Labels: -Cr-Blink-HTML Cr-Blink-Editing

Comment 4 by, Jan 8 2016

Status: Available
Blink stacks in while-loop in InsertListCommand::doApply() with following
condition is true:
  inSameTreeAndOrdered(startOfCurrentParagraph, startOfLastParagraph) && 
  !inSameParagraph(startOfCurrentParagraph, startOfLastParagraph, CanCrossEditingBoundary))

where |startOfCurrentParagraph| is P 5CA14180
|startOfLastParagaph| is #text	5CA182E0 "line2"

BODY	5CA14010
	#text	5CA180B0 "\n    "
	#comment	5CA18100
	#text	5CA18150 "\n    "
	DIV	5CA14124 ID="ce"
		#text	5CA181A0 "\n        "
		P	5CA14180
			UL	5CA142F0
				LI	5CA14238
					#text	5CA185B0 "line1"
				LI	5CA1434C
					BR	5CA14404
				LI	5CA14460
... omit LI/BR subtrees ...

			BUTTON	5CA28010
				#text	5CA18240 "hello"
		#text	5CA18290 "\n        "
		P	5CA141DC
*			#text	5CA182E0 "line2"
		#text	5CA18330 "\n    "
	#text	5CA18380 "\n    "
	#comment	5CA183D0
	#text	5CA18420 "\n    "
	BUTTON	5CA28098 ID="bulletButton"
		#text	5CA18470 "hang chrome"
	#text	5CA184C0 "\n    "
	SCRIPT	5CA34010
		#text	5CA18510 "... script ..."
	#text	5CA18560 "\n\n\n"

Project Member

Comment 5 by, Aug 18 2016

The following revision refers to this bug:

commit f15d4cc339737df653274e39726ae0d14d409b18
Author: joone.hur <>
Date: Thu Aug 18 20:28:11 2016

No hang when inserting a list over uneditable element in contenteditable

While firstEditablePositionAfterPositionInRootAlgorithm() is running,
we can get the next editable paragraph under the highest editable
node by skipping non-editable paragraph.

However, if an editable paragraph has a non-editable child, the next
paragraph can be the same editable paragraph that is the parent of the
non-editable child. In this case, we can't get the next editable
paragraph in InsertListCommand::doApply's while loop. As a result,
the while loop can't break, which makes the tab hang.

Here is the example:
<div contenteditable="true">
  <p>line1<button contenteditable="false">hello</button></p>

This CL allows to get the next editable paragraph by considering the
non-editable child element.

BUG= 571420 

Cr-Commit-Position: refs/heads/master@{#412925}


Comment 6 by, Oct 7 2016

I've reported a similar issue at that might have a related cause.

Comment 7 by, Oct 19 2016

Status: Fixed (was: Available)

Sign in to add a comment