mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
slider: fixed regression caused by a recent change in the mouse core - since the mouse core doesn't stop mousedown propagation by default now, the mousedown event was triggered twice - once by the bound handle, and once by the actual element.
This commit is contained in:
parent
0ef9a8ac3d
commit
2b92a02170
@ -72,9 +72,18 @@ $.widget("ui.slider", {
|
||||
|
||||
// Bind the click to the slider itself
|
||||
this.element.bind('mousedown.slider', function(event) {
|
||||
|
||||
if($(event.target).is('.ui-slider-handle')) return;
|
||||
|
||||
//Go to the actual clicked posiion, apply a click
|
||||
self._click.apply(self, [event]);
|
||||
|
||||
//initiate a handle drag, so we can click+drag somewhere
|
||||
self.currentHandle.data("mouse").trigger(event);
|
||||
self.firstValue = self.firstValue + 1; //This is for always triggering the change event
|
||||
|
||||
//This is for always triggering the change event
|
||||
self.firstValue = self.firstValue + 1;
|
||||
|
||||
});
|
||||
|
||||
// Move the first handle to the startValue
|
||||
|
Loading…
Reference in New Issue
Block a user