Skip to content

Commit 04f52f4

Browse files
Panel: Fix for Android zoom issue.
1 parent 73c820f commit 04f52f4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

css/structure/jquery.mobile.panel.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@
163163
left: 0;
164164
}
165165

166-
/* while open, page x overflow is disabled */
167-
.ui-page-active.ui-page-panel-open {
166+
/* always disable overflow-x to prevent zoom issue on Android */
167+
.ui-page-active.ui-page-panel {
168168
overflow-x: hidden;
169169
}
170170

js/widgets/panel.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $.widget( "mobile.panel", $.mobile.widget, {
1919
panelInner: "ui-panel-inner",
2020
modal: "ui-panel-dismiss",
2121
modalOpen: "ui-panel-dismiss-open",
22+
pagePanel: "ui-page-panel",
2223
pagePanelOpen: "ui-page-panel-open",
2324
contentWrap: "ui-panel-content-wrap",
2425
contentWrapOpen: "ui-panel-content-wrap-open",
@@ -93,6 +94,9 @@ $.widget( "mobile.panel", $.mobile.widget, {
9394
self._wrapper.addClass( this.options.classes.contentWrapClosed );
9495
self._fixedToolbar.addClass( this.options.classes.contentFixedToolbarClosed );
9596

97+
// add class to page so we can set "overflow-x: hidden;" for it to fix Android zoom issue
98+
self._page.addClass( self.options.classes.pagePanel );
99+
96100
// if animating, add the class to do so
97101
if ( $.support.cssTransform3d && !!self.options.animate ) {
98102
this.element.addClass( self.options.classes.animate );

0 commit comments

Comments
 (0)