Opened 11 years ago
Closed 11 years ago
#10404 closed defect (fixed)
TooltipDialog: focus lost on close (IE)
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit | Version: | 1.4.0b |
Keywords: | Cc: | Nathan Toone | |
Blocked By: | Blocking: |
Description (last modified by )
Saw this on IE7, not sure about other browsers.
- In test_TooltipDialog.html open the first TooltipDialog
- tab to DateTextBox
- press ESCAPE (it will close the drop down calendar)
- press ESCAPE again (it will close the drop down)
At this point focus should be on the button, but (at least on IE7) it's apparently moved to the <body>. Pressing TAB moves focus to the first button, rather than to the second button.
Change History (6)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
Summary: | TooltipDialog: focus lost on close (IE7) → TooltipDialog: focus lost on close (IE) |
---|
comment:3 Changed 11 years ago by
Cc: | Nathan Toone added |
---|
The _HasDropDown code looks suspicious. It closes the drop down first then shifts focus to the around node, whereas on IE we know that sometimes closing the node w/focus causes problems:
dijit.popup.close(this.dropDown); if(focus){ this.focus(); } ...
However IIRC I tried reversing those two lines and it didn't fix this problem.
comment:4 Changed 11 years ago by
(In [22191]) When closing a drop down, refocus the parent widget before closing the drop down, rather than after. This avoids a momentary focus onto <body> which causes problems with nested drop downs, when they all close, rather than just the top one. Refs #11132 (mostly fixing it), thanks to Xiao Wen W Zhu/Doug? Hays for patch.
comment:5 Changed 11 years ago by
Owner: | set to bill |
---|---|
Status: | new → assigned |
comment:6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [22236]) Fix IE focus problems in the robot tests Toolbar.html and TooltipDialog.html.
Show/hide of popups was implemented via dynamic addition/deletion of DOM nodes to the document. Those dynamic additions/deletions caused the current node to lose focus, or when the user tabs to a new field it gets focus momentarily but then focus jumps to <body>.
Best solution I could come up with was to pre-create the popup wrapper <div> and then not recycle wrapper <div> or <iframe> (although a possible optimization would be to recycle the iframe).
Seeing the same problem in the robot/Toolbar.html test. Steps to manually reproduce:
At this point focus should move back to the DropDown button. Actual result: it moves there temporarily then jumps to <body>.