Merge pull request #842 from owncloud/restrict_keyboard_shortcuts
prevent keyboardshortcuts from catching events outside the main doc - e....
This commit is contained in:
commit
d085fdf8ea
|
@ -127,6 +127,9 @@ var Files = Files || {};
|
||||||
}
|
}
|
||||||
Files.bindKeyboardShortcuts = function(document, $) {
|
Files.bindKeyboardShortcuts = function(document, $) {
|
||||||
$(document).keydown(function(event) { //check for modifier keys
|
$(document).keydown(function(event) { //check for modifier keys
|
||||||
|
if(!$(event.target).is('body')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var preventDefault = false;
|
var preventDefault = false;
|
||||||
if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode);
|
if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode);
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue