diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index b18f371a47fec53882c3dfb68e34d1a474eaf446..c4d97d1110e5e35915f4586de24f06cca6f1f3f2 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -3604,9 +3604,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
diff --git a/toolkit/actors/SelectParent.sys.mjs b/toolkit/actors/SelectParent.sys.mjs
index fa8ce002f0cd64395d04bcd1f93f6f8a89417a62..f92c6e8135319da2bdd39e5f76201b0818fa47ac 100644
--- a/toolkit/actors/SelectParent.sys.mjs
+++ b/toolkit/actors/SelectParent.sys.mjs
@@ -750,6 +750,7 @@ export class SelectParent extends JSWindowActorParent {
     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");