mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Selectmenu: fixed positioning with overflow in IE
This commit is contained in:
parent
21d96f12f8
commit
759e47a657
9
ui/jquery.ui.selectmenu.js
vendored
9
ui/jquery.ui.selectmenu.js
vendored
@ -204,7 +204,14 @@ $.widget( "ui.selectmenu", {
|
||||
this.menu.menu( "focus", event, currentItem );
|
||||
}, 1);
|
||||
|
||||
if ( !this.options.dropdown ) {
|
||||
if ( !this.options.dropdown ) {
|
||||
// center current item
|
||||
if ( this.menu.outerHeight() < this.menu.prop( "scrollHeight" ) ) {
|
||||
this.menuWrap.css( "left" , -10000 );
|
||||
this.menu.scrollTop( this.menu.scrollTop() + currentItem.position().top - this.menu.outerHeight()/2 + currentItem.outerHeight()/2 );
|
||||
this.menuWrap.css( "left" , "auto" );
|
||||
}
|
||||
|
||||
$.extend( this.options.position, {
|
||||
my: "left top",
|
||||
at: "left top",
|
||||
|
Loading…
Reference in New Issue
Block a user