curHandle,
timer;
- this.inputs.off('change.zf.slider').on('change.zf.slider', function(e) {
- var idx = _this.inputs.index($(this));
+ const handleChangeEvent = function(e) {
+ const idx = _this.inputs.index($(this));
_this._handleEvent(e, _this.handles.eq(idx), $(this).val());
+ };
+
+ // IE only triggers the change event when the input loses focus which strictly follows the HTML specification
+ // listen for the enter key and trigger a change
+ // @see https://html.spec.whatwg.org/multipage/input.html#common-input-element-events
+ this.inputs.off('keyup.zf.slider').on('keyup.zf.slider', function (e) {
+ if(e.keyCode == 13) handleChangeEvent.call(this, e);
});
+ this.inputs.off('change.zf.slider').on('change.zf.slider', handleChangeEvent);
+
if (this.options.clickSelect) {
this.$element.off('click.zf.slider').on('click.zf.slider', function(e) {
if (_this.$element.data('dragging')) { return false; }