Bug 1313195 - Clear active EventStateManager if a XUL popup is opened. r=enndeakin+6102

MozReview-Commit-ID: 2f6ui1X6cxj

--HG--
extra : rebase_source : 1dbe37ca5e75c6d1156438a3dc22d38102f5a902
This commit is contained in:
Mike Conley 2016-10-26 16:51:30 -04:00
parent a15991721b
commit 8325bc3f55

View File

@ -880,6 +880,13 @@ nsMenuPopupFrame::ShowPopup(bool aIsContextMenu)
// Clear mouse capture when a popup is opened.
if (mPopupType == ePopupTypeMenu) {
EventStateManager* activeESM =
static_cast<EventStateManager*>(
EventStateManager::GetActiveEventStateManager());
if (activeESM) {
EventStateManager::ClearGlobalActiveContent(activeESM);
}
nsIPresShell::SetCapturingContent(nullptr, 0);
}