Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#3983 closed defect (fixed)

Slider: with no discreteValues fails to send events via buttons

Reported by: guest Owned by: Douglas Hays
Priority: high Milestone: 1.0
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

HOW TO REPRODUCE:

Go to <http://82.230.65.68:31416/~fred/dojo/fred_samples/bug_002.html>
Click +

EXPECTED RESULT:

Value change to something like 0.0009852216748768472

RESULT:

Event is not fired, value not updated

Attachments (1)

bug_002.html (882 bytes) - added by guest 12 years ago.
Test case, as linked in the report

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by guest

Attachment: bug_002.html added

Test case, as linked in the report

comment:1 Changed 12 years ago by guest

This is on Mac OS X, Firefox, with dojo 0.9 serial #9050

comment:2 Changed 12 years ago by Adam Peller

Owner: changed from bill to Douglas Hays

comment:3 Changed 12 years ago by bill

Milestone: 0.9

comment:4 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [10021]) Fixes #3983. Special case discreteValues <= 1

comment:5 Changed 12 years ago by guest

Resolution: fixed
Status: closedreopened

I must be very stupid, but, with revision [10028], I still have the reported behavior.

Click on link bug_002.html Click on + button several time Value stays zero (If you click anywhere in the window, it is updated, but it is too late)

I also think the title of the issue is wrong: it should be "Slider with no intermediateChanges" don't send events via buttons.

comment:6 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

Clicking the buttons is an intermediate change - since intermediateChanges=false, no onChange event fires. Clicking the draggable handle and using the arrow keys are also intermediate changes. When the widget loses focus, then the onChange event fires for the last intermediate change. Dragging the handle is also an intermediate change, but the mouseup event after dragging causes the onChange event to fire to allow webkit users who can't focus on div's to use the slider.

comment:7 Changed 12 years ago by guest

Omg, I did not realise that this was the expected behavior. Time to argue against that on the forums, then.

Thanks for the update.

comment:8 Changed 12 years ago by bill

Milestone: 0.91.0
Resolution: fixed
Status: closedreopened
Summary: dijit.form.HorizontalSlider with no discreteValues fails to send events via buttonsSlider: with no discreteValues fails to send events via buttons

OK, we talked about this on IRC for a while. Decided it was too confusing to not fire an onChange event on arrow key or arrow button (imagine that a vertical slider is used to control the position in a table widget and the user hits the + button to go down one page). So let's change this to fire on arrow keyup or arrow button.

comment:9 Changed 12 years ago by Douglas Hays

The suggested behavior is different than the Spinner widget which is only slightly different the slider. Also, we might want slider to behave well with InlineEditBox? - and an immediate value change will close the editing sesson.

comment:10 Changed 12 years ago by bill

OK, let's think about this more after 0.9 is released.

comment:11 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

(In [10730]) Fixes #3983. Arrow keys and button clicks in slider now cause onChange to fire all the time, ignoring the intermediateChanges flag.

comment:12 Changed 9 years ago by bill

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