summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-12-12 12:55:29 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2012-12-12 12:55:29 +0100
commite8897c2b7e3a392f193e3e53dbbeb8178f5c2078 (patch)
treec1a1140084c40bdd64c4e451e0ea3802effa3cb9
parent72fe339c102975ee693e1ced005ca6d3f865389d (diff)
downloadnextcloud-server-e8897c2b7e3a392f193e3e53dbbeb8178f5c2078.tar.gz
nextcloud-server-e8897c2b7e3a392f193e3e53dbbeb8178f5c2078.zip
prevent keyboardshortcuts from catching events outside the main doc - e.g. the share popup
-rw-r--r--apps/files/js/keyboardshortcuts.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files/js/keyboardshortcuts.js b/apps/files/js/keyboardshortcuts.js
index 562755f55b7..cc2b5d42139 100644
--- a/apps/files/js/keyboardshortcuts.js
+++ b/apps/files/js/keyboardshortcuts.js
@@ -127,6 +127,9 @@ var Files = Files || {};
}
Files.bindKeyboardShortcuts = function(document, $) {
$(document).keydown(function(event) { //check for modifier keys
+ if(!$(event.target).is('body')) {
+ return;
+ }
var preventDefault = false;
if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode);
if (