Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#6647 closed bug (duplicate)

Focus loop override in modal dialogs not working in non-Gecko browsers

Reported by: CloudStrife Owned by:
Priority: undecided Milestone: 1.5
Component: ui.dialog Version: 1.8.5
Keywords: Cc:
Blocked by: Blocking:

Description

The dialog module has this code to override the browser focus loop:

prevent tabbing out of modal dialogs

if (options.modal) {

uiDialog.bind('keypress.ui-dialog', function(event) {

if (event.keyCode !== $.ui.keyCode.TAB) {

return;

}

var tabbables = $(':tabbable', this),

first = tabbables.filter(':first'), last = tabbables.filter(':last');

if (event.target === last[0] && !event.shiftKey) {

first.focus(1); return false;

} else if (event.target === first[0] && event.shiftKey) {

last.focus(1); return false;

}

However, I have found that Safari 5 and IE 8 do not run this handler when TAB is pressed. It is, however, run when normal printable characters are entered in input fields, etc.

Perhaps the devs can investigate a workaround using keydown for the affected browsers...?

Change History (4)

comment:1 Changed 9 years ago by Scott González

Resolution: duplicate
Status: newclosed

comment:2 Changed 9 years ago by Scott González

Duplicate of #3768.

comment:3 Changed 9 years ago by CloudStrife

Hi Scott, are you sure this is a duplicate? #3768 specifically mentions non-modal dialogs, but I have found this issue applies to modal dialogs on affected browsers.

P.S. After skimming the other tickets marked duplicate, I see that the same issue has indeed been filed.

Last edited 9 years ago by CloudStrife (previous) (diff)

comment:4 Changed 8 years ago by Scott González

Component: unfiledui.dialog
Note: See TracTickets for help on using tickets.