Skip to main content

Search and Top Navigation

#7992 closed bug (worksforme)

Opened January 06, 2012 02:31PM UTC

Closed January 06, 2012 02:40PM UTC

Last modified January 06, 2012 04:27PM UTC

slidestop event not firing when mouse outside slider

Reported by: mullet Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.slider Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery version: 1.7.1

O/S + Browsers:

  • Ubuntu 11.4 / Firefox 8.0
  • Ubuntu 11.4 / 16.0.912.63
  • OS X 10.7.2 / Chrome 16

Instructions to reproduce:

Create a slider element and bind something discernible to the slidestop event (e.g an alert).

Correctly trigger the slidestop event by moving the slider with the mouse above the slider.

Incorrectly fail to trigger the slidestop event by clicking the handle, dragging, then moving the mouse outside of the slider handle (e.g if it's a vertical orientation slider, move the mouse horizontally) - you can still move the mouse in the direction of the slider and the slider responds, however, releasing the mouse at this point fails to trigger the slidestop handler.

This is problematic to me for several reasons:

  • My slider is very narrow (a few px), but the handle is much wider (15px) - so even with the mouse over the handle, because it's outside the slider bar itself, it fails to trigger the handler
  • I have other events bound in my page, which are put on hold because the slider's sliding. If the slidestop doesn't trigger, my page gets frozen in an undesirable state.

For now I've hacked around it by adding a boolean variable which tracks when the slider's in use, which is unset with $('BODY').mouseup

Attachments (0)
Change History (4)

Changed January 06, 2012 02:40PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

This works fine for me. Please provide a reduced test case showing the problem.

Changed January 06, 2012 03:24PM UTC by mullet comment:2

It's down to how I was binding. .bind('slidestop'..) works fine. .delegate() and .on() both fail:

http://jsbin.com/udikeb

Changed January 06, 2012 03:42PM UTC by scottgonzalez comment:3

Ah, ok. That's a change in events work in jQuery 1.7. Use jQuery UI 1.8.17 and it'll work properly: http://jsbin.com/udikeb/2/edit

Changed January 06, 2012 04:27PM UTC by mullet comment:4

Thanks Scott. I can survive with my hack until the next stable release :)

Cheers

Mark