Skip to content
This repository
Browse code

Uses `position: fixed` blacklist to fix popup overlays in browsers th…

…at know what they’re doing with `position: fixed`, to avoid monsterous overlays on long pages in some cases.
  • Loading branch information...
commit 5959db0b0649921de607b03965fb11d5d6f78e89 1 parent 34c091e
Mat Marquis authored September 07, 2012
5  css/structure/jquery.mobile.popup.css
... ...
@@ -1,7 +1,6 @@
1 1
 .ui-popup-open .ui-header-fixed,
2 2
 .ui-popup-open .ui-footer-fixed {
3 3
 	position: absolute !important; 	/* See line #553 of popup.js */
4  
-
5 4
 }
6 5
 .ui-popup-screen {
7 6
 	background-image: url(data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==); /* Necessary to set some form of background to ensure element is clickable in IE6/7. While legacy IE won’t understand the data-URI’d image, it ensures no additional requests occur in all other browsers with little overhead. */
@@ -14,7 +13,9 @@
14 13
 	opacity: 0;
15 14
 	z-index: 1099;
16 15
 }
17  
-
  16
+.ui-popup-screen.ui-screen-fixed {
  17
+	position: fixed;
  18
+}
18 19
 .ui-popup-screen.in {
19 20
 	opacity: 0.5;
20 21
 	filter: Alpha(Opacity=50);
4  js/widgets/popup.js
@@ -541,6 +541,10 @@ define( [ "jquery",
541 541
 				transition = this.options.transition;
542 542
 			}
543 543
 
  544
+			if ( !$.mobile.fixedBlacklist ) {
  545
+				this._ui.screen.addClass( "ui-screen-fixed" );
  546
+			}
  547
+
544 548
 			if ( !this.options.theme ) {
545 549
 				this._setTheme( this._page.jqmData( "theme" ) || $.mobile.getInheritedTheme( this._page, "c" ) );
546 550
 			}

0 notes on commit 5959db0

Please sign in to comment.
Something went wrong with that request. Please try again.