Skip to content

Commit

Permalink
Don't Stop 'touchend' Propagation all the time
Browse files Browse the repository at this point in the history
Details exposed here :
#8
  • Loading branch information
zippy1978 committed Feb 28, 2013
1 parent 7818741 commit 713daa9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.scrollz.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions dist/jquery.scrollz.js
@@ -1,4 +1,4 @@
/*! jQuery Scrollz - v1.0.3 - 2013-02-24
/*! jQuery Scrollz - v1.0.3 - 2013-02-28
* https://github.com/zippy1978/jquery.scrollz
* Copyright (c) 2013 Gilles Grousset; Licensed MIT, GPL */

Expand Down Expand Up @@ -135,7 +135,6 @@
// Add touch end listener
container.bind(_getTouchEventName($this, 'touchend'), function(event) {
// Prevent default behaviour
event.preventDefault();
// Handle
_handleTouchEndEvent(event, $this);
});
Expand Down Expand Up @@ -593,6 +592,13 @@
// Nothing to do : touch was already processed
return;
}

// Only prevent the default event from
// happening when the user has actually
// scrolled
if (startTouchY !== lastTouchY) {
event.preventDefault();
}

var pullHeaderHeight = _getPullHeaderHeight(instance);

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.scrollz.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jquery.scrollz.jquery.json
Expand Up @@ -2,7 +2,7 @@
"name": "jquery.scrollz",
"title": "jQuery Scrollz",
"description": "Modern scrolling for jQuery and jQuery Mobile.",
"version": "1.0.3",
"version": "1.0.4",
"homepage": "https://github.com/zippy1978/jquery.scrollz",
"author": {
"name": "Gilles Grousset",
Expand Down
8 changes: 7 additions & 1 deletion src/jquery.scrollz.js
Expand Up @@ -131,7 +131,6 @@
// Add touch end listener
container.bind(_getTouchEventName($this, 'touchend'), function(event) {
// Prevent default behaviour
event.preventDefault();
// Handle
_handleTouchEndEvent(event, $this);
});
Expand Down Expand Up @@ -589,6 +588,13 @@
// Nothing to do : touch was already processed
return;
}

// Only prevent the default event from
// happening when the user has actually
// scrolled
if (startTouchY !== lastTouchY) {
event.preventDefault();
}

var pullHeaderHeight = _getPullHeaderHeight(instance);

Expand Down

0 comments on commit 713daa9

Please sign in to comment.