Index: Source/core/editing/DeleteSelectionCommand.cpp |
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp |
index 48ef864969a3969c7ac49e1707e92987d81854d9..de814092d875265882ff4096cb7ef045a27687ec 100644 |
--- a/Source/core/editing/DeleteSelectionCommand.cpp |
+++ b/Source/core/editing/DeleteSelectionCommand.cpp |
@@ -516,7 +516,7 @@ void DeleteSelectionCommand::handleGeneralDelete() |
removeNode(node.get()); |
node = nextNode.get(); |
} else { |
- Node& n = node->lastDescendant(); |
+ Node& n = node->lastDescendantOrSelf(); |
if (m_downstreamEnd.deprecatedNode() == n && m_downstreamEnd.deprecatedEditingOffset() >= caretMaxOffset(&n)) { |
removeNode(node.get()); |
node = nullptr; |