mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Bug 49273 - always set the hover state on content when we get a MOUSE_ENTER event. This prevents problems with some window managers that send MOUSE_LEAVE and MOUSE_ENTER events before ButtonPress events. r=saari, sr=blizzard.
This commit is contained in:
parent
9855a27e0a
commit
7b1af9e0fe
@ -1290,6 +1290,15 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
}
|
||||
case NS_MOUSE_ENTER:
|
||||
nsCOMPtr<nsIContent> targetContent;
|
||||
if (mCurrentTarget) {
|
||||
mCurrentTarget->GetContentForEvent(aPresContext, aEvent,
|
||||
getter_AddRefs(targetContent));
|
||||
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
//Reset target frame to null to avoid mistargetting after reentrant event
|
||||
|
@ -1290,6 +1290,15 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
|
||||
}
|
||||
}
|
||||
}
|
||||
case NS_MOUSE_ENTER:
|
||||
nsCOMPtr<nsIContent> targetContent;
|
||||
if (mCurrentTarget) {
|
||||
mCurrentTarget->GetContentForEvent(aPresContext, aEvent,
|
||||
getter_AddRefs(targetContent));
|
||||
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
//Reset target frame to null to avoid mistargetting after reentrant event
|
||||
|
Loading…
Reference in New Issue
Block a user