Index: Source/core/editing/commands/InsertListCommand.cpp |
diff --git a/Source/core/editing/commands/InsertListCommand.cpp b/Source/core/editing/commands/InsertListCommand.cpp |
index 50ae87704242539c32db1ebc6a453e5b6ce7e9c7..6bdfebbca519c3107222fe8ca78fdea1abf3a7d3 100644 |
--- a/Source/core/editing/commands/InsertListCommand.cpp |
+++ b/Source/core/editing/commands/InsertListCommand.cpp |
@@ -395,7 +395,7 @@ PassRefPtrWillBeRawPtr<HTMLElement> InsertListCommand::listifyParagraph(const Vi |
// Try to avoid inserting it somewhere where it will be surrounded by |
// inline ancestors of start, since it is easier for editing to produce |
// clean markup when inline elements are pushed down as far as possible. |
- Position insertionPos(start.deepEquivalent().upstream()); |
+ Position insertionPos(mostBackwardCaretPosition(start.deepEquivalent())); |
// Also avoid the containing list item. |
Node* listChild = enclosingListChild(insertionPos.anchorNode()); |
if (isHTMLLIElement(listChild)) |