File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 4040 hide : null ,
4141 autoOpen : false ,
4242 multiple : true ,
43- position : { }
43+ position : { } ,
44+ appendTo : document . body
4445 } ,
4546
4647 _create : function ( ) {
6869 menu = ( this . menu = $ ( '<div />' ) )
6970 . addClass ( 'ui-multiselect-menu ui-widget ui-widget-content ui-corner-all' )
7071 . addClass ( o . classes )
71- . appendTo ( document . body ) ,
72+ . appendTo ( o . appendTo ) ,
7273
7374 header = ( this . header = $ ( '<div />' ) )
7475 . addClass ( 'ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix' )
578579 // show the menu, maybe with a speed/effect combo
579580 $ . fn . show . apply ( menu , args ) ;
580581
581- // select the first option
582+ // select the first not disabled option
582583 // triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover
583584 // will actually trigger mouseenter. the mouseenter trigger is there for when it's eventually fixed
584- this . labels . eq ( 0 ) . trigger ( 'mouseover' ) . trigger ( 'mouseenter' ) . find ( 'input' ) . trigger ( 'focus' ) ;
585+ this . labels . filter ( ':not(.ui-state-disabled)' ) . eq ( 0 ) . trigger ( 'mouseover' ) . trigger ( 'mouseenter' ) . find ( 'input' ) . trigger ( 'focus' ) ;
585586
586587 button . addClass ( 'ui-state-active' ) ;
587588 this . _isOpen = true ;
You can’t perform that action at this time.
0 commit comments