Skip to content

Commit

Permalink
Ignore "command" event from middle-click in Firefox 89+
Browse files Browse the repository at this point in the history
  • Loading branch information
Infocatcher committed Jul 12, 2021
1 parent df7b489 commit bd09e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Toggle_Restartless_Add-ons/toggleRestartlessAddons.js
Expand Up @@ -47,7 +47,7 @@ var xulns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

var mp = document.createElementNS(xulns, "menupopup");
mp.setAttribute("onpopupshowing", "this.updateMenu();");
mp.setAttribute("oncommand", "this.handleEvent(event);");
mp.setAttribute("oncommand", "if(!event.button) this.handleEvent(event);"); // Ignore middle-click in Firefox 89+
mp.setAttribute("onmousedown", "if(event.button == 0) this.handleEvent(event);");
mp.setAttribute("onclick", "if(event.button > 0) this.handleEvent(event);");
mp.setAttribute("oncontextmenu", "return false;");
Expand Down

0 comments on commit bd09e25

Please sign in to comment.