DescriptionNo 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>
<p>line2</p>
</div>
This CL allows to get the next editable paragraph by considering the
non-editable child element.
BUG=571420
TEST=editing/selection/insert-list-over-uneditable-in-contenteditable.html
Committed: https://crrev.com/f15d4cc339737df653274e39726ae0d14d409b18
Cr-Commit-Position: refs/heads/master@{#412925}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Remove extra blanks in the test case #
Messages
Total messages: 16 (10 generated)
|