kbd_nav: disable navigation shortcuts when any dialog is open
Without this, it becomes impossible to move the cursor inside a text field (for example when editing the tags of an image).
This commit is contained in:
parent
e4c5e79b7c
commit
f0758bb35c
@ -27,6 +27,11 @@ $.fn.KbdNavigation = function(options, callback) {
|
||||
if ($('#sb-body-inner>img#sb-content').is(':visible')) {
|
||||
return false;
|
||||
}
|
||||
// ignore shortcuts when inside a jQuery dialog; otherwise it becomes impossible
|
||||
// to navigate the cursor inside an input box
|
||||
if ($('.ui-widget-overlay').is(':visible')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
var direction = "ltr";
|
||||
if (document.body) {
|
||||
@ -94,4 +99,4 @@ $.fn.KbdNavigation = function(options, callback) {
|
||||
$(document).ready( function() {
|
||||
$(document).KbdNavigation({});
|
||||
if ($('#sb-content').is(':visible')) { return true; }
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user