diff --git a/public/scripts/popup.js b/public/scripts/popup.js index b793f3a66..03ca81e8c 100644 --- a/public/scripts/popup.js +++ b/public/scripts/popup.js @@ -107,6 +107,13 @@ export class Popup { // illegal argument } + this.input.addEventListener('keydown', (evt)=>{ + if (evt.key != 'Enter' || evt.altKey || evt.ctrlKey || evt.shiftKey) return; + evt.preventDefault(); + evt.stopPropagation(); + this.completeAffirmative(); + }); + this.ok.addEventListener('click', ()=>this.completeAffirmative()); this.cancel.addEventListener('click', ()=>this.completeNegative()); const keyListener = (evt)=>{