Ticket #4958 (closed enhancement: fixed)
Need an 'onSelect' event for slider... especially for Ajax apps
| Reported by: | guest | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 0.9 |
| Severity: | major | Keywords: | |
| Cc: |
Description
Here's what I would like to do..
I would like to trigger an action when any one of the following occurs:
a) The user clicks on the slider bar ("clickSelect")
b) The user slides the slider to a position and then releases the mouse button
What I don't want is for my action to execute for every intermediate value when the user is sliding. I can't set intermediateChanges to false because I still need the textbox updating to tell the user what value they're on during the slide (I do this with onChange). But I only want something to fire when the user has found the right value, stops and releases. Essentially, I'm looking to simulate an onSelect (vs an onChange).
I think an appropriate name for the event I am trying simulate would be 'onSelect'. I think that would cover both cases...
a) When the user is sliding and stops and releases the mouse button.
b) When the user clicks on the slider bar to have the slider jump to that location.
My thinking is that both an onClick on the slider bar as well as an onClick (or onMouseUp?) on the slider handle should constitute and onSelect. In other words...
a) If the user clicks on the slider bar, onSelect would be triggered.
b) If the user slides the handle (by clicking and holding mouse button down) to the position he wants and releases (mouseUp) this would also trigger onSelect.
c) As for A11y, I guess the same thing, only use keyUp.
I think in these cases, it is a reasonable assumption that the user is where he wants to be and expects the appropriate action to be triggered. I know some users will click on the slider bar repeatedly to get where they want, but that's just something I would have to deal with... user would learn eventually if the corresponding action takes too long.
To see the original discussion on this, please look here... http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-support/slider-events-onchange-question
Thanks