mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-01 05:48:26 +00:00
Ensure that mDocument is current before accessing it. Fixes some timing-related focus problems. Bug 241942, r+sr=jst, a=asa.
This commit is contained in:
parent
ebbce189ea
commit
2cf459d69c
@ -3986,6 +3986,7 @@ nsEventStateManager::SetContentState(nsIContent *aContent, PRInt32 aState)
|
||||
}
|
||||
|
||||
if ((aState & NS_EVENT_STATE_FOCUS)) {
|
||||
EnsureDocument(mPresContext);
|
||||
if (aContent && (aContent == mCurrentFocus) && gLastFocusedDocument == mDocument) {
|
||||
// gLastFocusedDocument appears to always be correct, that is why
|
||||
// I'm not setting it here. This is to catch an edge case.
|
||||
|
Loading…
x
Reference in New Issue
Block a user