Only update the select command for focused text inputs. Bug 394792, r=roc,
sr=neil, a=roc git-svn-id: svn://10.0.0.236/trunk@236005 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -323,6 +323,17 @@ nsTextInputListener::NotifySelectionChanged(nsIDOMDocument* aDoc, nsISelection*
|
||||
|
||||
mSelectionWasCollapsed = collapsed;
|
||||
|
||||
if (!mFrame) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> focusedContent;
|
||||
mFrame->PresContext()->EventStateManager()->
|
||||
GetFocusedContent(getter_AddRefs(focusedContent));
|
||||
if (focusedContent != mFrame->GetContent()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
return UpdateTextInputCommands(NS_LITERAL_STRING("select"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user