diff --git a/content/events/src/nsEventStateManager.cpp b/content/events/src/nsEventStateManager.cpp index effe1e0ba23c..b8f207c3ac9d 100644 --- a/content/events/src/nsEventStateManager.cpp +++ b/content/events/src/nsEventStateManager.cpp @@ -4179,8 +4179,7 @@ nsresult nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent PRBool canContainChildren; startContent = do_QueryInterface(startNode); - if (!isCollapsed && - NS_SUCCEEDED(startContent->CanContainChildren(canContainChildren)) && + if (NS_SUCCEEDED(startContent->CanContainChildren(canContainChildren)) && canContainChildren) { startContent->ChildAt(*aStartOffset, *getter_AddRefs(childContent)); if (childContent) @@ -4188,8 +4187,7 @@ nsresult nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent } endContent = do_QueryInterface(endNode); - if (!isCollapsed && - NS_SUCCEEDED(endContent->CanContainChildren(canContainChildren)) && + if (NS_SUCCEEDED(endContent->CanContainChildren(canContainChildren)) && canContainChildren) { PRInt32 endOffset = 0; domRange->GetEndOffset(&endOffset);