Skip to content

Commit

Permalink
Disable native vertical scrolling on drag
Browse files Browse the repository at this point in the history
  • Loading branch information
abpetkov committed Mar 15, 2014
1 parent 12369e3 commit 82cdd53
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/powerange.js
Original file line number Diff line number Diff line change
Expand Up @@ -1644,6 +1644,7 @@ Horizontal.prototype.onmousedown = function(e) {
*/

Horizontal.prototype.onmousemove = function(e) {
e.preventDefault();
if (e.touches) e = e.touches[0];

var leftOffset = this.handleOffsetX + e.clientX - this.startX
Expand Down Expand Up @@ -1765,6 +1766,7 @@ Vertical.prototype.onmousedown = function(e) {
*/

Vertical.prototype.onmousemove = function(e) {
e.preventDefault();
if (e.touches) e = e.touches[0];

var bottomOffset = this.handleOffsetY + this.startY - e.clientY
Expand Down
2 changes: 1 addition & 1 deletion dist/powerange.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/horizontal.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Horizontal.prototype.onmousedown = function(e) {
*/

Horizontal.prototype.onmousemove = function(e) {
e.preventDefault();
if (e.touches) e = e.touches[0];

var leftOffset = this.handleOffsetX + e.clientX - this.startX
Expand Down
1 change: 1 addition & 0 deletions lib/vertical.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Vertical.prototype.onmousedown = function(e) {
*/

Vertical.prototype.onmousemove = function(e) {
e.preventDefault();
if (e.touches) e = e.touches[0];

var bottomOffset = this.handleOffsetY + this.startY - e.clientY
Expand Down

0 comments on commit 82cdd53

Please sign in to comment.