From b1cf4625094873bf20cab6b70334de12b0999257 Mon Sep 17 00:00:00 2001 From: Felix Nagel Date: Sun, 29 May 2011 20:49:42 +0200 Subject: [PATCH] fixed: issue with z-index, thx to juja, see: https://github.com/fnagel/jquery-ui/issues/95 --- themes/base/jquery.ui.selectmenu.css | 2 +- ui/jquery.ui.selectmenu.js | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) 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, -- 2.39.5