We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4d79561 commit 50abdb4Copy full SHA for 50abdb4
src/js/gui.js
@@ -383,17 +383,16 @@ class GuiControl {
383
384
const confirmAction = () => {
385
dialog[0].close();
386
- dialog.off("keydown");
+ $(document).off("keydown.informationDialog");
387
resolve();
388
};
389
390
buttonConfirm.on("click", confirmAction);
391
392
// Add Enter key support for single-choice dialog
393
- // Remove any previous keydown handlers before adding new one
394
395
- dialog.on("keydown", (e) => {
396
- if (e.key === "Enter") {
+ $(document).on("keydown.informationDialog", (e) => {
+ if (e.which === 13) {
397
e.preventDefault();
398
confirmAction();
399
}
0 commit comments