Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#7992 closed bug (worksforme)

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

Change History (4)

comment:1 Changed 8 years ago by Scott González

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 8 years ago by mullet

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

http://jsbin.com/udikeb

comment:3 Changed 8 years ago by Scott González

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

comment:4 Changed 8 years ago by mullet

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

Cheers

Mark

Note: See TracTickets for help on using tickets.