Skip to content

Commit

Permalink
Disable touch events on disabled slider
Browse files Browse the repository at this point in the history
  • Loading branch information
abpetkov committed Mar 15, 2014
1 parent 8f4c009 commit 03ec219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,9 @@ <h2>Development</h2>

</div>

<script src="../dist/powerange.min.js"></script>
<script src="../build/build.js"></script>
<script type="text/javascript">
var Powerange = require('powerange');

// Basic customization.
var cust = document.querySelector('.js-customized');
Expand Down
1 change: 1 addition & 0 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ Powerange.prototype.checkValues = function(start) {
Powerange.prototype.disable = function() {
if (this.options.min == this.options.max || this.options.min > this.options.max || this.options.disable) {
this.mouse.unbind();
this.touch.unbind();
this.slider.style.opacity = this.options.disableOpacity;
}
};
Expand Down

0 comments on commit 03ec219

Please sign in to comment.