Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#6013 closed defect (fixed)

Dialog: focus leave the dialog box when dialog contains tab container

Reported by: ptbrunet Owned by: Becky Gibson
Priority: high Milestone: 1.1
Component: Dijit Version: 1.1b1
Keywords: Cc: Becky Gibson
Blocked By: Blocking:

Description (last modified by Becky Gibson)

Go to http://archive.dojotoolkit.org/nightly/checkout/dijit/tests/test_Dialog.html. Activate third button to invoke dialog with tab container, dialog appears, with focus on first tab title, press tab, focus leaves the dialog.

Attachments (2)

6013a.patch (4.4 KB) - added by Becky Gibson 11 years ago.
fixes on FF but not IE
treeWalkerb.patch (6.4 KB) - added by Joseph Scheuhammer 11 years ago.
Patch to ignore display:none or visbility:invisible styled elements

Download all attachments as: .zip

Change History (9)

comment:1 Changed 11 years ago by bill

Owner: set to Becky Gibson

Changed 11 years ago by Becky Gibson

Attachment: 6013a.patch added

fixes on FF but not IE

comment:2 Changed 11 years ago by Becky Gibson

Status: newassigned

6013a.patch attached fixes the problem on FF but it is a bit ugly - we need to check for the first and last focusable items everytime there is a keyboard event since if there is a widget inside of the dialog, the keyboard event may have changed the focusable items. There is still a problem in IE - if you open the dialog with the tab container then tabbing within the dialog works fine. The tabcontainer gets the keyboard event and then the dialog gets it. but, if you open the same dialog again then the tab container gets the keypress but the dialog does not and focus leaves the dialog. I think it has something to do with how the onkeypress event gets set. any clues appreciated.

comment:3 Changed 11 years ago by Becky Gibson

(In [12761]) fixes #6012 refs #6013 Need to find the focusable items in a dialog and tooltip dialog each time the dialog is shown or a key is pressed because the contents of the dialog may change the focus order (as in the case of a tabcontainer). Updated the dialog and tooltip dialogs so that the tabContainer tests have focusable items in at least one tab pane.

comment:4 Changed 11 years ago by Becky Gibson

Description: modified (diff)

The problem seems to be that findFocusableItem apis find focusable items that are inside of hidden divs. In this example there is a focusable item on the second tab pane. This item is found as the lastFocusableItem. The dialog _onKey tries to set focus to the lastFocusableItem when the tab key is pressed - since it is within a hidden div focus goes out to the document.

comment:5 Changed 11 years ago by Becky Gibson

(In [12766]) refs #6012 #6013 in _onKey only need to find focusable items when tab key is received since we only care about trapping navigation by tab and shift-tab

Changed 11 years ago by Joseph Scheuhammer

Attachment: treeWalkerb.patch added

Patch to ignore display:none or visbility:invisible styled elements

comment:6 Changed 11 years ago by simonjb

(In [12844]) Ignore elements that are hidden or not visible when traversing the DOM for dijit.getFirstInTabbingOrder and dijit.getLastInTabbingOrder; patch by Joseph Scheuhammer (University of Toronto ATRC, CCLA on file) and Simon Bates; refs #6013

comment:7 Changed 11 years ago by Becky Gibson

Resolution: fixed
Status: assignedclosed

confirmed that [12844] fixes - closing

Note: See TracTickets for help on using tickets.