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 40
40
hide : null ,
41
41
autoOpen : false ,
42
42
multiple : true ,
43
- position : { }
43
+ position : { } ,
44
+ appendTo : document . body
44
45
} ,
45
46
46
47
_create : function ( ) {
68
69
menu = ( this . menu = $ ( '<div />' ) )
69
70
. addClass ( 'ui-multiselect-menu ui-widget ui-widget-content ui-corner-all' )
70
71
. addClass ( o . classes )
71
- . appendTo ( document . body ) ,
72
+ . appendTo ( o . appendTo ) ,
72
73
73
74
header = ( this . header = $ ( '<div />' ) )
74
75
. addClass ( 'ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix' )
578
579
// show the menu, maybe with a speed/effect combo
579
580
$ . fn . show . apply ( menu , args ) ;
580
581
581
- // select the first option
582
+ // select the first not disabled option
582
583
// triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover
583
584
// 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' ) ;
585
586
586
587
button . addClass ( 'ui-state-active' ) ;
587
588
this . _isOpen = true ;
You can’t perform that action at this time.
0 commit comments