Commit 6f51e055 authored by Andray's avatar Andray

prevent alt menu for firefox

parent 3e0146f9
......@@ -966,3 +966,26 @@ onUiLoaded(async() => {
// Add integration with Inpaint Anything
// applyZoomAndPanIntegration("None", ["#ia_sam_image", "#ia_sel_mask"]);
});
onUiLoaded(function() {
let isAltPressed = false;
function handleAltKeyDown(e) {
if (e.code === "AltLeft" || e.code === "AltRight") {
isAltPressed = true;
} else {
isAltPressed = false;
}
}
function handleAltKeyUp(e) {
if (isAltPressed) {
e.preventDefault();
}
isAltPressed = false;
}
document.addEventListener("keydown", handleAltKeyDown);
document.addEventListener("keyup", handleAltKeyUp);
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment