fix keyboard shortcut setup on mobile

This commit is contained in:
azivner
2018-12-24 18:39:31 +01:00
parent 35cf8026b0
commit eeb62a6cf2
3 changed files with 16 additions and 6 deletions

View File

@@ -136,11 +136,13 @@ function randomString(len) {
}
function bindShortcut(keyboardShortcut, handler) {
$(document).bind('keydown', keyboardShortcut, e => {
handler();
if (isDesktop()) {
$(document).bind('keydown', keyboardShortcut, e => {
handler();
e.preventDefault();
});
e.preventDefault();
});
}
}
function isMobile() {