Bug 1502576 - The search bar's popup should not open when clicking menu items in its context menu. r=mkaply

Differential Revision: https://phabricator.services.mozilla.com/D12374

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Drew Willcoxon 2018-11-26 18:11:50 +00:00
parent a2f107533b
commit 086071e674

View File

@ -464,6 +464,11 @@ class MozSearchbar extends MozXULElement {
return;
}
// Ignore clicks on menu items in the input's context menu.
if (event.originalTarget.localName == "menuitem") {
return;
}
let isIconClick = event.originalTarget.classList.contains("searchbar-search-button");
// Ignore clicks on the icon if they were made to close the popup