зеркало из https://github.com/mozilla/pjs.git
Bug 405094 Tooltip doesn't disappear anymore when hovering over it
r+sr=roc a=beltzner
This commit is contained in:
Родитель
4c6f419e7c
Коммит
b0f65647bf
|
@ -3726,13 +3726,13 @@ nsContentUtils::GetTopLevelWidget(nsIWidget* aWidget)
|
|||
{
|
||||
if (!aWidget) {
|
||||
return nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
nsIWidget* currWidget = aWidget;
|
||||
nsIWidget* parentWidget;
|
||||
while ((parentWidget = currWidget->GetParent()) != nsnull) {
|
||||
currWidget = parentWidget;
|
||||
}
|
||||
}
|
||||
return currWidget;
|
||||
}
|
||||
|
||||
|
|
|
@ -2980,13 +2980,6 @@ nsEventStateManager::NotifyMouseOut(nsGUIEvent* aEvent, nsIContent* aMovingInto)
|
|||
return;
|
||||
|
||||
if (mLastMouseOverFrame) {
|
||||
if (nsContentUtils::GetTopLevelWidget(aEvent->widget) !=
|
||||
nsContentUtils::GetTopLevelWidget(mLastMouseOverFrame->GetWindow())) {
|
||||
// the MouseOut event widget doesn't have same top widget with
|
||||
// mLastMouseOverFrame, it's a spurious event for mLastMouseOverFrame
|
||||
return;
|
||||
}
|
||||
|
||||
// if the frame is associated with a subdocument,
|
||||
// tell the subdocument that we're moving out of it
|
||||
nsIFrameFrame* subdocFrame;
|
||||
|
@ -3123,6 +3116,15 @@ nsEventStateManager::GenerateMouseEnterExit(nsGUIEvent* aEvent)
|
|||
{
|
||||
// This is actually the window mouse exit event. We're not moving
|
||||
// into any new element.
|
||||
|
||||
if (mLastMouseOverFrame &&
|
||||
nsContentUtils::GetTopLevelWidget(aEvent->widget) !=
|
||||
nsContentUtils::GetTopLevelWidget(mLastMouseOverFrame->GetWindow())) {
|
||||
// the MouseOut event widget doesn't have same top widget with
|
||||
// mLastMouseOverFrame, it's a spurious event for mLastMouseOverFrame
|
||||
break;
|
||||
}
|
||||
|
||||
NotifyMouseOut(aEvent, nsnull);
|
||||
}
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче