Bug 1909163 - make select dropdowns more properly tabspecific, r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D219618
This commit is contained in:
Gijs Kruitbosch 2024-08-20 12:48:42 +00:00
Родитель cabdc29d6a
Коммит e942f7bc56
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -3364,9 +3364,9 @@ var XULBrowserWindow = {
};
// If the location is changed due to switching tabs,
// ensure we close any open tabspecific panels.
// ensure we close any open tabspecific popups.
if (aIsSimulated) {
closeOpenPanels("panel[tabspecific='true']");
closeOpenPanels(":is(panel, menupopup)[tabspecific='true']");
}
// Ensure we close any remaining open locationspecific panels

Просмотреть файл

@ -744,13 +744,13 @@ export class SelectParent extends JSWindowActorParent {
let menulist = document.createXULElement("menulist");
menulist.setAttribute("id", "ContentSelectDropdown");
menulist.setAttribute("popuponly", "true");
menulist.setAttribute("tabspecific", "true");
menulist.setAttribute("hidden", "true");
let popup = menulist.appendChild(document.createXULElement("menupopup"));
popup.setAttribute("id", "ContentSelectDropdownPopup");
popup.setAttribute("activateontab", "true");
popup.setAttribute("position", "after_start");
popup.setAttribute("tabspecific", "true");
popup.setAttribute("level", "parent");
if (AppConstants.platform == "win") {
popup.setAttribute("consumeoutsideclicks", "false");