зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1706816 - If we're asked to open a native menu when another menu is already open, close the other menu first. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D113048
This commit is contained in:
Родитель
46ddaffa50
Коммит
d92a3be6fd
|
@ -774,7 +774,9 @@ bool nsXULPopupManager::ShowPopupAsNativeMenu(nsIContent* aPopup, int32_t aXPos,
|
|||
Event* aTriggerEvent) {
|
||||
if (mNativeMenu) {
|
||||
NS_WARNING("Native menu still open when trying to open another");
|
||||
mNativeMenu->RemoveObserver(this);
|
||||
RefPtr<NativeMenu> menu = mNativeMenu;
|
||||
(void)menu->Close();
|
||||
menu->RemoveObserver(this);
|
||||
mNativeMenu = nullptr;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче