зеркало из https://github.com/mozilla/pjs.git
check if there is an active focus controller before sending the blur
(r=pink/sr=bryner/a=brendan) bug 198153
This commit is contained in:
Родитель
cc713fc8d3
Коммит
7bad112096
|
@ -3972,9 +3972,18 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
|
|||
aContent = nsnull;
|
||||
}
|
||||
} else {
|
||||
// see comments in ShiftFocusInternal on mCurrentFocus overloading
|
||||
PRBool fcActive = PR_FALSE;
|
||||
if (mDocument) {
|
||||
nsCOMPtr<nsIFocusController> fc;
|
||||
fc = getter_AddRefs(GetFocusControllerForDocument(mDocument));
|
||||
if (fc)
|
||||
fc->GetActive(&fcActive);
|
||||
}
|
||||
notifyContent[3] = gLastFocusedContent;
|
||||
NS_IF_ADDREF(gLastFocusedContent);
|
||||
SendFocusBlur(mPresContext, aContent, PR_TRUE);
|
||||
// only raise window if the the focus controller is active
|
||||
SendFocusBlur(mPresContext, aContent, fcActive);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче