Skip to content

Commit

Permalink
Merge pull request snapappointments#1047 from TwanVermeulen/master
Browse files Browse the repository at this point in the history
Enhanced selected option detection to fix default title in IE8
  • Loading branch information
caseyjhol committed May 31, 2015
2 parents 7a26e57 + 466d925 commit 1b2fecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/bootstrap-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@
titleOption.value = '';
element.insertBefore(titleOption, element.firstChild);
// Check if selected attribute is already set on an option. If not, select the titleOption option.
if (element.options[element.selectedIndex].getAttribute('selected') === null) titleOption.selected = true;
if ($(element.options[element.selectedIndex]).attr('selected') === undefined) titleOption.selected = true;
}
}

Expand Down

0 comments on commit 1b2fecb

Please sign in to comment.