Explorar o código

Allow using alt in the prompt fields again

Aarni Koskela %!s(int64=2) %!d(string=hai) anos
pai
achega
3636c2c6ed
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      javascript/edit-order.js

+ 1 - 1
javascript/edit-order.js

@@ -6,11 +6,11 @@ function keyupEditOrder(event) {
     let target = event.originalTarget || event.composedPath()[0];
     let target = event.originalTarget || event.composedPath()[0];
     if (!target.matches("*:is([id*='_toprow'] [id*='_prompt'], .prompt) textarea")) return;
     if (!target.matches("*:is([id*='_toprow'] [id*='_prompt'], .prompt) textarea")) return;
     if (!event.altKey) return;
     if (!event.altKey) return;
-    event.preventDefault();
 
 
     let isLeft = event.key == "ArrowLeft";
     let isLeft = event.key == "ArrowLeft";
     let isRight = event.key == "ArrowRight";
     let isRight = event.key == "ArrowRight";
     if (!isLeft && !isRight) return;
     if (!isLeft && !isRight) return;
+    event.preventDefault();
 
 
     let selectionStart = target.selectionStart;
     let selectionStart = target.selectionStart;
     let selectionEnd = target.selectionEnd;
     let selectionEnd = target.selectionEnd;