Skip to content

Commit 58085b4

Browse files
committed
fixed: selectmenu widget now works correct with jQuery UI dialog widegt, thx to dannycohn, see https://github.com/fnagel/jquery-ui/issues#issue/23
1 parent 158a966 commit 58085b4

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

ui/jquery.ui.selectmenu.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -530,20 +530,24 @@ $.widget("ui.selectmenu", {
530530
this.list.attr('aria-activedescendant', activeID);
531531
},
532532
_refreshPosition: function(){
533-
var o = this.options;
533+
var o = this.options;
534534
// if its a native pop-up we need to calculate the position of the selected li
535535
if (o.style == "popup" && !o.positionOptions.offset) {
536536
var selected = this.list.find('li:not(.ui-selectmenu-group):eq('+this._selectedIndex()+')');
537537
// var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
538538
var _offset = "0 -" + (selected.outerHeight() + selected.offset().top - this.list.offset().top);
539539
}
540-
this.list.position({
541-
// set options for position plugin
542-
of: o.positionOptions.of || this.newelement,
543-
my: o.positionOptions.my,
544-
at: o.positionOptions.at,
545-
offset: o.positionOptions.offset || _offset
546-
});
540+
this.list
541+
.css({
542+
zIndex: this.element.zIndex()
543+
})
544+
.position({
545+
// set options for position plugin
546+
of: o.positionOptions.of || this.newelement,
547+
my: o.positionOptions.my,
548+
at: o.positionOptions.at,
549+
offset: o.positionOptions.offset || _offset
550+
});
547551
}
548552
});
549553
})(jQuery);

0 commit comments

Comments
 (0)