Permalink
Browse files

Helpers: Prevent silentScroll if user has already scrolled

Fixes #3958
Closes #8448
  • Loading branch information...
apsdehal authored and arschmitz committed Jun 20, 2016
1 parent a6c9834 commit 09964922d70500f09485a948e3d53c0ffa185438
Showing with 6 additions and 0 deletions.
  1. +6 −0 js/helpers.js
View
@@ -109,6 +109,12 @@ $.extend( $.mobile, {
// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
silentScroll: function( ypos ) {
// If user has already scrolled then do nothing
if ( $.mobile.window.scrollTop() > 0 ) {
return;
}
if ( $.type( ypos ) !== "number" ) {
ypos = $.mobile.defaultHomeScroll;
}

0 comments on commit 0996492

Please sign in to comment.