Fix keybinding in upload modal

pull/1/head
yflory 4 years ago
parent 3de5ca75a6
commit ff0a570034

@ -65,12 +65,13 @@ define([
switch (e.which) { switch (e.which) {
case 27: // cancel case 27: // cancel
if (typeof(no) === 'function') { no(e); } if (typeof(no) === 'function') { no(e); }
$(el || window).off('keydown', handler);
break; break;
case 13: // enter case 13: // enter
if (typeof(yes) === 'function') { yes(e); } if (typeof(yes) === 'function') { yes(e); }
$(el || window).off('keydown', handler);
break; break;
} }
$(el || window).off('keydown', handler);
}; };
$(el || window).keydown(handler); $(el || window).keydown(handler);

Loading…
Cancel
Save