From: Felix Nagel Date: Sun, 29 May 2011 18:49:42 +0000 (+0200) Subject: fixed: issue with z-index, thx to juja, see: https://github.com/fnagel/jquery-ui... X-Git-Tag: selectmenu_v1.1.0~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b1cf4625094873bf20cab6b70334de12b0999257;p=jquery-ui.git fixed: issue with z-index, thx to juja, see: https://github.com/fnagel/jquery-ui/issues/95 --- diff --git a/themes/base/jquery.ui.selectmenu.css b/themes/base/jquery.ui.selectmenu.css index c6982fc19..7f1b42fec 100644 --- a/themes/base/jquery.ui.selectmenu.css +++ b/themes/base/jquery.ui.selectmenu.css @@ -27,4 +27,4 @@ * html .ui-selectmenu-menu li { border-color: pink; filter:chroma(color=pink); width:100%; } * html .ui-selectmenu-menu li a { position: relative } /* IE7 workaround (opacity disabled) */ -*+html .ui-state-disabled, *+html .ui-state-disabled a{ color: silver; } \ No newline at end of file +*+html .ui-state-disabled, *+html .ui-state-disabled a { color: silver; } \ No newline at end of file diff --git a/ui/jquery.ui.selectmenu.js b/ui/jquery.ui.selectmenu.js index 61c642f35..5ed7ab448 100644 --- a/ui/jquery.ui.selectmenu.js +++ b/ui/jquery.ui.selectmenu.js @@ -779,11 +779,14 @@ $.widget("ui.selectmenu", { var selected = this._selectedOptionLi(); var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top); } - this.list - .css({ - zIndex: this.element.zIndex() - }) - .position({ + // update zIndex if jQuery UI is able to process + var zIndexElement = this.element.zIndex(); + if (zIndexElement) { + this.list.css({ + zIndex: zIndexElement + }); + } + this.list.position({ // set options for position plugin of: o.positionOptions.of || this.newelement, my: o.positionOptions.my,