Skip to content

Commit

Permalink
Don't fire mouseover or mouseout events when locked.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Humphrey committed Nov 30, 2011
1 parent 4ec27a3 commit 4f0b6ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions content/events/src/nsEventStateManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3896,6 +3896,11 @@ class MouseEnterLeaveDispatcher
void
nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
{
// If the mouse is locked, don't fire mouseout events
if (mMouseLocked) {
return;
}

if (!mLastMouseOverElement)
return;
// Before firing mouseout, check for recursion
Expand Down Expand Up @@ -3956,6 +3961,11 @@ nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
void
nsEventStateManager::NotifyMouseOver(nsGUIEvent* aEvent, nsIContent* aContent)
{
// If the mouse is locked, don't fire mouseover events
if (mMouseLocked) {
return;
}

NS_ASSERTION(aContent, "Mouse must be over something");

if (mLastMouseOverElement == aContent)
Expand Down

0 comments on commit 4f0b6ec

Please sign in to comment.