Bug Tracker

Opened 15 years ago

Closed 14 years ago

#1757 closed enhancement (wontfix)

Slider - click should raise stop event

Reported by: pfm102 Owned by: paul
Priority: major Milestone: 1.2.2
Component: ui Version: 1.2.1
Keywords: Cc:
Blocked by: Blocking:


If the user clicks in the slider (as opposed to dragging the handle), the handle moves to where the click happened. However, this does not raise either the stop or the change event; I think it should (indeed, it would be REALLY handy to me if it did!).

Change History (5)

comment:1 Changed 15 years ago by pfm102

It would also be handy to have an isSliding property. I'm building the seek-bar for a media-player control, which has a time-display and a seek-bar. Time ticks along as the video plays. However, if I drag the slider handle to seek, I want the time-display to show where the video would start playing from if I release the mouse-button. While I'm sliding, I don't want the time-display to update; that would spoil the UI a bit.

So, I'm trying to make a kind of mutex in my own code to prevent this, and it works well. I grab the mutex in the slide eventhandler, and release it in the stop eventhandler. However, now, if I click in the bar to seek to where the mouse is, the mutex is grabbed but not released, because the stop eventhandler does not fire.

comment:2 Changed 15 years ago by pfm102

Actually, this looks like a bug, on further inspection. The call on the lines that read (in the click function):

if(this.interaction.pickValue != this.interaction.curValue)
  $(this.element).triggerHandler("slidechange", [e, this.prepareCallbackObj(this.interaction)], o.change);

passes window as the value of the self parameter (to prepareCallbackObj) where I think it's supposed to pass a reference to the slider.

I'll try to fix and submit a patch...

comment:3 Changed 15 years ago by pfm102

ARGH! Sorry. I was using the stop event instead of the change event. If I subscribe to the change event, all is well.

So, it seems this is an enhancement, but not one that I need, now :-)

comment:4 Changed 15 years ago by paul

Owner: set to paul
Status: newassigned

comment:5 Changed 14 years ago by paul

Resolution: wontfix
Status: assignedclosed
Note: See TracTickets for help on using tickets.