Skip to content

Commit 5f236f5

Browse files
committed
#80 - Change event flow changes - Now continuous UP arrow press considered as drag and final only change event.
1 parent 441b467 commit 5f236f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/roundslider.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@
393393
var preValue = this["_pre" + event], currentValue = this.options.value;
394394
if (preValue !== currentValue) {
395395
this["_pre" + event] = currentValue;
396+
if (event == "change") this._updatePre();
396397
this._updateTooltip();
397398
if ((event == "change") || (this._bindOnDrag && event == "drag")) this._updateHidden();
398399
return this._raise(event, { value: currentValue, preValue: preValue, "handle": this._handleArgs() });
@@ -504,10 +505,11 @@
504505

505506
ang = this._valueToAngle(val);
506507
this._changeSliderValue(val, ang);
507-
this._raiseEvent("change");
508+
this._raiseEvent("drag");
508509
},
509510
_handleKeyUp: function (e) {
510511
this._addAnimation();
512+
this._raiseEvent("change");
511513
},
512514
_getMinusStep: function (val) {
513515
var o = this.options, min = o.min, max = o.max, step = o.step;

0 commit comments

Comments
 (0)