#5434 closed defect (fixed)
sometimes clicking a form widget doesn't focus it
Reported by: | bill | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.1 |
Component: | Dijit | Version: | 1.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In test_validate.html often clicking the "Age" textbox doesn't focus it. I think we just need an onclick handler on the visibility:hidden validation icon that puts focus in the form field.
Change History (5)
comment:1 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
In [13893]: better fix that doesn't require a setTimeout(). The old fix had a race condition if a user's onClick() handler changed the focus; the focus would sometimes jump back the button.
comment:3 Changed 11 years ago by
(In [21299]) Move onclick --> focus() code from _CssStateMixin back to _FormWidget.
This code was added in to _FormWidget in [11894] and [13893] so that clicking a non-focusable part of a form widget (ValidationTextBox validation icon, or the spinner up/down arrows) would cause the form widget to focus. But, it's inappropriate for bigger widgets, in particular Editor.
Actually I was nervous that it wouldn't even work correctly for ComboButton (which has two focus points), but it seems to.
comment:4 Changed 11 years ago by
(In [21387]) Put onMouseUp --> focus() handling in FormWidget not FormValueWidget, as it was in the 1.4 release.
Otherwise on hrome clicking a button doesn't give it focus, which leads to problems restoring focus when closing a Dialog. (Dialog_menu.html is actually failing because focus is restored to the DateTextBox inside of the dialog, Refs #5434, #6888, #10613. Fixes #10708 !strict.
comment:5 Changed 11 years ago by
Ugh, there's some key I keep hitting by mistake that submits before I've finished writing the comment, perhaps ctrl-c instead of shift-C (I was about to write "Chrome" above, not "hrome").
Above comment should read:
(In [21387]) Put onMouseUp --> focus() handling in FormWidget not FormValueWidget, as it was in the 1.4 release.
Otherwise on Chrome, clicking a button doesn't give it focus, which leads to problems restoring focus when closing a Dialog. Dialog_menu.html is actually failing with the following series of events:
- user clicks "Show Dialog" button but it doesn't get focus
- user focuses on DateTextBox inside of Dialog
- user closes Dialog, but focus is still marked as being on the DateTextBox.
- user presses "Show Dialog" button again, and Dialog remembers the DateTextBox as the restore-focus point
- user closes Dialog again
- Dialog restores focus to the DateTextBox, even though the Dialog containing the DateTextBox is hidden, making the calendar drop-down appear in the upper left of the viewport.
(In [11894]) Fixes #5434. _FormWidget:_onMouse(onmousedown) now sets focus.