Permalink
Browse files

Panel: Always scroll to top when opening a panel, unless it it's a fi…

…xed panel. Fixes #5858.
  • Loading branch information...
jaspermdegroot committed Jul 25, 2013
1 parent 1ef88f5 commit af1f5a2e25961761c662ee1fda08bed2b4ca2e70
Showing with 1 addition and 7 deletions.
  1. +1 −7 js/widgets/panel.js
View
@@ -172,18 +172,12 @@ $.widget( "mobile.panel", {
self._unfixPanel();
$.mobile.resetActivePageHeight( panelInnerHeight );
}
self._scrollIntoView( panelInnerHeight );
window.scrollTo( 0, $.mobile.defaultHomeScroll );
} else {
self._fixPanel();
}
},
_scrollIntoView: function( panelInnerHeight ) {
if ( panelInnerHeight < $( window ).scrollTop() ) {
window.scrollTo( 0, 0 );
}
},
_bindFixListener: function() {
this._on( $( window ), { "throttledresize": "_positionPanel" });
},

0 comments on commit af1f5a2

Please sign in to comment.