1
0

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:
Thomas Bleher 2010-09-16 04:28:42 +08:00 committed by Tim Almdal
parent e4c5e79b7c
commit f0758bb35c

View File

@ -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; }
});
});