summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-20 19:16:00 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-20 19:16:00 +0200
commit04c7949bc3da9e02e563436d7d772424c5492a69 (patch)
treea8726ee3f8ff94cac8d362f23d51b26acfffde05
parent20a3f8c006445b176fa8559f6529c2cf3cb75b0d (diff)
downloadUXP-04c7949bc3da9e02e563436d7d772424c5492a69.tar
UXP-04c7949bc3da9e02e563436d7d772424c5492a69.tar.gz
UXP-04c7949bc3da9e02e563436d7d772424c5492a69.tar.lz
UXP-04c7949bc3da9e02e563436d7d772424c5492a69.tar.xz
UXP-04c7949bc3da9e02e563436d7d772424c5492a69.zip
Bug 1317030 - Removing/reattaching an element from the DOM triggers spurious mouseenter events
native in moebius
-rw-r--r--dom/events/EventStateManager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/dom/events/EventStateManager.cpp b/dom/events/EventStateManager.cpp
index c23cdb575..f66cf3f90 100644
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -4034,7 +4034,7 @@ public:
}
}
- ~EnterLeaveDispatcher()
+ void Dispatch()
{
if (mEventMessage == eMouseEnter || mEventMessage == ePointerEnter) {
for (int32_t i = mTargets.Count() - 1; i >= 0; --i) {
@@ -4119,6 +4119,7 @@ EventStateManager::NotifyMouseOut(WidgetMouseEvent* aMouseEvent,
// Fire mouseout
DispatchMouseOrPointerEvent(aMouseEvent, isPointer ? ePointerOut : eMouseOut,
wrapper->mLastOverElement, aMovingInto);
+ leaveDispatcher.Dispatch();
wrapper->mLastOverFrame = nullptr;
wrapper->mLastOverElement = nullptr;
@@ -4193,6 +4194,7 @@ EventStateManager::NotifyMouseOver(WidgetMouseEvent* aMouseEvent,
DispatchMouseOrPointerEvent(aMouseEvent,
isPointer ? ePointerOver : eMouseOver,
aContent, lastOverElement);
+ enterDispatcher->Dispatch();
wrapper->mLastOverElement = aContent;
} else {
wrapper->mLastOverFrame = nullptr;