From e8897c2b7e3a392f193e3e53dbbeb8178f5c2078 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 12 Dec 2012 12:55:29 +0100 Subject: [PATCH] prevent keyboardshortcuts from catching events outside the main doc - e.g. the share popup --- apps/files/js/keyboardshortcuts.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files/js/keyboardshortcuts.js b/apps/files/js/keyboardshortcuts.js index 562755f55b..cc2b5d4213 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 (