[popup] Getting rid of the z-index stuff - using the z-index value from .ui-selectmenu

This commit is contained in:
Gabriel Schulhof 2012-01-16 17:09:30 +02:00
parent db75dd16b0
commit 39dd1c4d39
2 changed files with 2 additions and 15 deletions

View file

@ -1,4 +1,5 @@
.ui-popup-container {
z-index: 1100 !important;
display: inline-block;
position: absolute;
padding: 0px;

View file

@ -202,21 +202,7 @@ $.widget("mobile.popup", $.mobile.widget, {
var self = this,
coords = this._placementCoords(
(undefined === x ? window.innerWidth / 2 : x),
(undefined === y ? window.innerHeight / 2 : y)),
zIndexMax = 0;
$(document)
.find("*")
.each(function() {
var el = $(this),
zIndex = parseInt(el.css("z-index"));
if (!(el.is(self._ui.container) || el.is(self._ui.screen) || isNaN(zIndex)))
zIndexMax = Math.max(zIndexMax, zIndex);
});
this._ui.screen.css("z-index", (zIndexMax + 1));
this._ui.container.css("z-index", (zIndexMax + 2));
(undefined === y ? window.innerHeight / 2 : y));
this._ui.screen
.height($(document).height())