Skip to content

Commit

Permalink
Add support to interactions with the input element (when input event …
Browse files Browse the repository at this point in the history
…happens)

partly closes andreruffert#47 andreruffert#152
  • Loading branch information
brunoais committed Mar 3, 2016
1 parent 61dd776 commit 5c1ac29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
this.$document.on(this.startEvent, '#' + this.identifier + ':not(.' + this.options.disabledClass + ')', this.handleDown);

// Listen to programmatic value changes
this.$element.on('change.' + this.identifier, function(e, data) {
this.$element.on('change.' + this.identifier + ' input.' + this.identifier, function(e, data) {
if (data && data.origin === _this.identifier) {
return;
}
Expand Down Expand Up @@ -319,6 +319,8 @@

// If we click on the handle don't set the new position
if ((' ' + e.target.className + ' ').replace(/[\n\t]/g, ' ').indexOf(this.options.handleClass) > -1) {
this.$element.focus();
e.preventDefault();
return;
}

Expand Down

0 comments on commit 5c1ac29

Please sign in to comment.