Closed primoz990 closed 9 years ago
Good spot, it should have been unbinding the listener on mouseup - I've pushed a fix in v0.0.11
Woow, that was a fast response :D v0.0.11 Works like a charm, thanks a lot :)
You're lucky - I happen to be using the rangeslider in a project today so I needed the fix too :-)
I just implemented the range slider. Working well, but i noticed that the onMouseUp event gets called 1 time, the second time i release the handle it gets called 2 times, 3rd 3 times...and so on... The problem(i gues) is that $document.bind(offEvent, ...); is called every time when an handle is pressed. This leads to this that the offEvent is bound X times to a slider and the onMouseUp event gets called X times.
I want to bind an http get task on the onMouseUp, so i realy need the event to fire just once.
My quick fix was to unbind the offEvent every time before bind, but that is not the best solution i gues: $document.unbind(offEvent); $document.bind(offEvent, ...) ...