Bug 1778923, set pointer-events: none; on xul:browser when select popup is open, r=edgar,emilio,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232557
This commit is contained in:
@@ -1923,7 +1923,20 @@ static void DispatchCrossProcessMouseExitEvents(WidgetMouseEvent* aMouseEvent,
|
||||
mouseExitEvent->mExitFrom =
|
||||
Some(aIsReallyExit ? WidgetMouseEvent::ePuppet
|
||||
: WidgetMouseEvent::ePuppetParentToPuppetChild);
|
||||
aRemoteTarget->SendRealMouseEvent(*mouseExitEvent);
|
||||
|
||||
auto ContentReactsToPointerEvents = [](BrowserParent* aRemoteTarget) {
|
||||
if (Element* owner = aRemoteTarget->GetOwnerElement()) {
|
||||
if (nsSubDocumentFrame* subDocFrame =
|
||||
do_QueryFrame(owner->GetPrimaryFrame())) {
|
||||
return subDocFrame->ContentReactsToPointerEvents();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
if (ContentReactsToPointerEvents(aRemoteTarget)) {
|
||||
aRemoteTarget->SendRealMouseEvent(*mouseExitEvent);
|
||||
}
|
||||
|
||||
aRemoteTarget = GetBrowserParentAncestor(aRemoteTarget);
|
||||
}
|
||||
|
||||
@@ -319,6 +319,7 @@ export var SelectParentHelper = {
|
||||
let win = menulist.ownerGlobal;
|
||||
if (browser) {
|
||||
browser.constrainPopup(menupopup);
|
||||
browser.style.pointerEvents = "none";
|
||||
} else {
|
||||
menupopup.setConstraintRect(new win.DOMRect(0, 0, 0, 0));
|
||||
}
|
||||
@@ -405,7 +406,10 @@ export var SelectParentHelper = {
|
||||
let popup = event.target;
|
||||
this._unregisterListeners(popup);
|
||||
popup.parentNode.hidden = true;
|
||||
this._currentBrowser = null;
|
||||
if (this._currentBrowser) {
|
||||
this._currentBrowser.style.pointerEvents = "";
|
||||
this._currentBrowser = null;
|
||||
}
|
||||
this._currentMenulist = null;
|
||||
this._selectRect = null;
|
||||
this._currentZoom = 1;
|
||||
|
||||
Reference in New Issue
Block a user