Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit af1f5a2

Browse files
Panel: Always scroll to top when opening a panel, unless it it's a fixed panel. Fixes #5858.
1 parent 1ef88f5 commit af1f5a2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

js/widgets/panel.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,12 @@ $.widget( "mobile.panel", {
172172
self._unfixPanel();
173173
$.mobile.resetActivePageHeight( panelInnerHeight );
174174
}
175-
self._scrollIntoView( panelInnerHeight );
175+
window.scrollTo( 0, $.mobile.defaultHomeScroll );
176176
} else {
177177
self._fixPanel();
178178
}
179179
},
180180

181-
_scrollIntoView: function( panelInnerHeight ) {
182-
if ( panelInnerHeight < $( window ).scrollTop() ) {
183-
window.scrollTo( 0, 0 );
184-
}
185-
},
186-
187181
_bindFixListener: function() {
188182
this._on( $( window ), { "throttledresize": "_positionPanel" });
189183
},

0 commit comments

Comments
 (0)