Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#11053 closed defect (fixed)

[regression] Slider: clicking disabled Slider focuses it

Reported by: haysmark Owned by: bill
Priority: high Milestone: 1.5
Component: Dijit - Form Version: 1.5.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Compare:

http://archive.dojotoolkit.org/dojo-2010-04-15/dojotoolkit/dijit/tests/form/test_Slider.html

http://archive.dojotoolkit.org/dojo-2010-04-16/dojotoolkit/dijit/tests/form/test_Slider.html

When you disable the first slider and click the left arrow to attempt to decrement the value, the slider incorrectly gets the dark gray selected style, as if the slider weren't disabled. This affects all browsers.

Also, I noticed in earlier versions of Dojo the mouse changed to a circle with a line through it when you moved the mouse over a disabled slider, was this feature intentionally removed?

Change History (4)

comment:1 Changed 10 years ago by bill

The circle-slash was intentionally removed, I was told by the usability guys that it means "not allowed" and is used for drag & drop, but isn't appropriate for indicating disabled.

(I assume the other thing is a bug though)

comment:2 Changed 10 years ago by bill

Owner: set to bill
Status: newassigned
Summary: Regression: Slider disabled style broken[regression] Slider: clicking disabled Slider focuses it

OK, looks like fallout from my [21851] checkin, although the real problem is #8595 (see also #8903).

comment:3 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

(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).

Fixes #8903, #8923, #8595, #11053, refs #11064 !strict.

comment:4 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.