Skip to content

Commit edf9886

Browse files
author
Eric Hynds
committed
Merge pull request #252 from doits/fixIE
Fix IE JS Error if first item is disabled
2 parents eeb48fc + 1d08b9e commit edf9886

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jquery.multiselect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,10 @@
578578
// show the menu, maybe with a speed/effect combo
579579
$.fn.show.apply(menu, args);
580580

581-
// select the first option
581+
// select the first not disabled option
582582
// triggering both mouseover and mouseover because 1.4.2+ has a bug where triggering mouseover
583583
// 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');
584+
this.labels.filter(':not(.ui-state-disabled)').eq(0).trigger('mouseover').trigger('mouseenter').find('input').trigger('focus');
585585

586586
button.addClass('ui-state-active');
587587
this._isOpen = true;

0 commit comments

Comments
 (0)