Skip to content

Commit b3e9d79

Browse files
committed
Issue 177: rangeinput now recalculates it's internal state every time sliding begins. makes it work better on different/unexpected scenarios.
1 parent 6f3192f commit b3e9d79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/rangeinput/rangeinput.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,12 @@
344344
// dragging
345345
handle.drag({drag: false}).bind("dragStart", function() {
346346

347-
/* do some pre- calculations for seek() function. improves performance */
347+
/* do some pre- calculations for seek() function. improves performance */
348+
init();
348349

349350
// avoid redundant event triggering (= heavy stuff)
350351
fireOnSlide = hasEvent($(self)) || hasEvent(input);
351-
352+
352353

353354
}).bind("drag", function(e, y, x) {
354355

@@ -370,8 +371,7 @@
370371
if (input.is(":disabled") || e.target == handle[0]) {
371372
return e.preventDefault();
372373
}
373-
374-
init();
374+
375375
var fix = handle.width() / 2;
376376
slide(e, vertical ? len-origo-fix + e.pageY : e.pageX -origo -fix);
377377
});

0 commit comments

Comments
 (0)