Opened 11 years ago

Closed 11 years ago

#6050 closed defect (fixed)

Dialog: Focus leaves dialog when tabbing in IE.

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

Description (last modified by bill)

I tried the last 20080302 night build, and opened the test dialog html page, then found that. when tabbing after the last focus item focused, focus goes to the ie addressbar.

This only happens when you have already opened the dialog once on the page. The second time you open the dialog (or if you open a different dialog) the focus is not trapped.

Change History (14)

comment:1 Changed 11 years ago by Douglas Hays

Resolution: invalid
Status: newclosed

I need a better description to understand the problem. Tabbing is supposed to cycle through all the fields including the addressbar, but this works the same in the other browsers as well, so I guess I'm just not seeing the problem.

comment:2 Changed 11 years ago by bill

Resolution: invalid
Status: closedreopened

Actually focus is supposed to loop through the fields in the dialog... tabbing from the last field should go to the first field. Becky (and the a11y team) is doing work in this area now... reassigning there.

comment:3 Changed 11 years ago by bill

Owner: set to Becky Gibson
Status: reopenednew

comment:4 Changed 11 years ago by Douglas Hays

I tried this in IE6 and the focus is looping from last field to first field inside the Dialog, and first to last with shift+tab.

comment:5 Changed 11 years ago by Becky Gibson

This happens when you have already opened the dialog once on the page. The second time you open the dialog (or if you open a different dialog) the focus is not trapped.

comment:6 Changed 11 years ago by Becky Gibson

the onkeypress handler isn't getting called the second time a dialog is opened in IE. dialog and tooltip dialog set up the onkey handlers differently - I'm not sure why?

comment:7 Changed 11 years ago by davidb

Cc: davidb added

comment:8 Changed 11 years ago by bill

Description: modified (diff)
Summary: Focus leave dialog when tabbing in IE.Dialog: Focus leaves dialog when tabbing in IE.

From IRC meeting: Dialog adds/removes an onkeypress handler on <body> whenever the dialog is shown/hidden. That's so that if the user clicks somewhere random on the screen (defocusing the dialog) that we will still capture keystrokes. Not sure how important that is, but that's apparently why it's there. See #3780 (and [9808])

comment:9 Changed 11 years ago by Becky Gibson

The problem starts occuring in the Feb-19-2008 build (the Feb-18 build DOES work). The onkeypress handler doesn't get called. I haven't tracked down what exact change caused the problem as there was nothing specific to dialog for that build.

comment:10 Changed 11 years ago by Becky Gibson

I tracked this down to [12598] - sent email to committer asking for help

comment:11 Changed 11 years ago by sjmiles

Resolution: fixed
Status: newclosed

(In [12848]) Fixes #6050, make sure to clear _stealthKeydownHandle, so key listener can be reconnected later.
Fixes #6063, use new Function() to generate "pure" (closes over nothing) functions. !strict (return value complaints)

comment:12 Changed 11 years ago by Becky Gibson

Resolution: fixed
Status: closedreopened

comment:13 Changed 11 years ago by Becky Gibson

Now focus is not trapped at all within a dialog on IE - even the first time it is loaded.

comment:14 Changed 11 years ago by sjmiles

Resolution: fixed
Status: reopenedclosed

(In [12870]) Must pass calling context on event handler through to event fixer to locate the correct currentTarget and window.event. Fixes #6069. Fixes #6050. !strict

Note: See TracTickets for help on using tickets.