#8903 closed defect (fixed)
ComboButton: disabled can still get focus
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit - Form | Version: | 1.3.0b3 |
Keywords: | Cc: | Douglas Hays | |
Blocked By: | Blocking: |
Description
On test_Button.html in FF, in the console do:
dijit.byId("save").attr("disabled", true);
Then click the disabled button. It still gets focus. Tabbing from previous buttons also sets a tab stop there.
I'll check in tests for this into Button_a11y.html, commented out. Uncomment when this is fixed.
Change History (8)
comment:1 Changed 12 years ago by
Cc: | Douglas Hays added |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 11 years ago by
Component: | Accessibility → Dijit |
---|---|
Owner: | Becky Gibson deleted |
Why is this accessibility? Setting back to dijit.
comment:5 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
comment:6 Changed 11 years ago by
Milestone: | 1.6 → 1.5 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
Changed my mind, will fix this for 1.5.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [22011]) Fixes so that disabled widgets don't get focus by mouse or keyboard:
- Made focus manager ignore click events on disabled widgets. It still responds to actual focus events so that Menu still works (which focuses the disabled MenuItems). Clicking a disabled dijit.form.Button in an enabled TabContainer will call onFocus() on the TabContainer (and the ContentPane) but not the Button.
- Fixed _FormWidget._setDisabledAttr() to set/remove tabIndex on all focusable nodes. Usually only focusNode is focusable, but ComboButton has two focusable nodes. Disabling a widget now sets tabIndex=-1 on nodes like <button> but removes tabIndex on nodes like <div>.
- Added new method dijit.hasDefaultTabStop() to support above code.
The only remaining problem is webkit, where clicking widgets still gives them focus, but this is a webkit bug that doesn't seem feasible to workaround. I did add workaround code for webkit so at least keyboard works correctly, by using tabIndex=-1 instead of removing tabIndex (see #11064 for details).
comment:8 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
Hopefully this s related: the disabled ComboBox? in test_ComboBox.html can be focused and shows the dotted outline (I'm testing with FF2 on WinXP). Looks like 2 issues: 1) this._focused=true (focus manager problem), and 2) in dijit.css, dijitDisabled disables the cursor but not the outline CSS attribute.