commit fccd7e8fdfb27a3cebfc12244ea3061a38abca51
parent 093064e23418bfbb6715da1d6239b7cb8f3ed0a9
Author: Narcis Beleuzu <nbeleuzu@mozilla.com>
Date: Tue, 14 Oct 2025 12:14:21 +0300
Revert "Bug 1993731 - Do not show the Ask an AI Chatbot menu item asynchronously. r=Mardak,firefox-ai-ml-reviewers" for causing failures on browser_contextmenuFillLogins.js
This reverts commit cdebec5f1e634bccde29011849c4359a30396a0e.
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/browser/components/genai/GenAI.sys.mjs b/browser/components/genai/GenAI.sys.mjs
@@ -670,10 +670,11 @@ export const GenAI = {
contextTabs = null,
} = contextMenu;
+ showItem(menu, false);
+
// DO NOT show menu when inside an extension panel
const uri = browser.browsingContext.currentURI.spec;
if (uri.startsWith("moz-extension:")) {
- showItem(menu, false);
return;
}
@@ -697,7 +698,6 @@ export const GenAI = {
break;
}
if (!canShow) {
- showItem(menu, false);
return;
}
@@ -719,9 +719,6 @@ export const GenAI = {
menu.menupopup?.remove();
}
- // NOTE: Show the menu item synchronously, before any `await`.
- showItem(menu, true);
-
// Determine if we have selection or should use page content
const context = {
contentType: "selection",
@@ -809,6 +806,8 @@ export const GenAI = {
Services.prefs.setBoolPref("browser.ml.chat.menu", false);
}
});
+
+ showItem(menu, true);
},
/**