Fix for shift-tabbing out of the document into the URL bar (the tab-from-caret code was getting confused in this case). Bug 136495, r=aaronl, sr=ben.
git-svn-id: svn://10.0.0.236/trunk@119700 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4322887b08
commit
cad03cc1f6
@ -4179,7 +4179,8 @@ nsresult nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent
|
||||
PRBool canContainChildren;
|
||||
|
||||
startContent = do_QueryInterface(startNode);
|
||||
if (NS_SUCCEEDED(startContent->CanContainChildren(canContainChildren)) &&
|
||||
if (!isCollapsed &&
|
||||
NS_SUCCEEDED(startContent->CanContainChildren(canContainChildren)) &&
|
||||
canContainChildren) {
|
||||
startContent->ChildAt(*aStartOffset, *getter_AddRefs(childContent));
|
||||
if (childContent)
|
||||
@ -4187,7 +4188,8 @@ nsresult nsEventStateManager::GetDocSelectionLocation(nsIContent **aStartContent
|
||||
}
|
||||
|
||||
endContent = do_QueryInterface(endNode);
|
||||
if (NS_SUCCEEDED(endContent->CanContainChildren(canContainChildren)) &&
|
||||
if (!isCollapsed &&
|
||||
NS_SUCCEEDED(endContent->CanContainChildren(canContainChildren)) &&
|
||||
canContainChildren) {
|
||||
PRInt32 endOffset = 0;
|
||||
domRange->GetEndOffset(&endOffset);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user