- Patch #786394 by casey: improve overlay keydown handler (TAB-navigation).

merge-requests/26/head
Dries Buytaert 2010-06-10 16:36:56 +00:00
parent e4dd88023d
commit a3445b5038
1 changed files with 1 additions and 1 deletions

View File

@ -613,7 +613,7 @@ Drupal.overlay.eventhandlerRestrictKeyboardNavigation = function (event) {
// move the focus along until it is.
var direction = event.shiftKey ? -1 : 1;
var current = this.$tabbables.index(event.target);
var $allowedParent = $('#overlay-container, .overlay-displace-top, .overlay-displace-bottom');
var $allowedParent = '#overlay-container, .overlay-displace-top, .overlay-displace-bottom';
if (current != -1 && this.$tabbables[current + direction] && !this.$tabbables.eq(current + direction).closest($allowedParent).length) {
while (this.$tabbables[current + direction] && !this.$tabbables.eq(current + direction).closest($allowedParent).length) {
current = current + direction;