From ff0a5700349e57ec53c90110ff287893eedd9da7 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 25 Nov 2020 16:36:48 +0100 Subject: [PATCH] Fix keybinding in upload modal --- www/common/common-interface.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 9fae121dc..3e9d848cd 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -65,12 +65,13 @@ define([ switch (e.which) { case 27: // cancel if (typeof(no) === 'function') { no(e); } + $(el || window).off('keydown', handler); break; case 13: // enter if (typeof(yes) === 'function') { yes(e); } + $(el || window).off('keydown', handler); break; } - $(el || window).off('keydown', handler); }; $(el || window).keydown(handler);