If select is empty and then make refresh u got error
"bootstrap-select.js:948 Uncaught TypeError: Cannot read property 'classList' of undefined".
Bootstrap version: 1.13.5
Line code is: active.classList.remove('active');
//i made ajax autocomplete for bootstrap select
//before showing new select content i need to remove old content
select.html('');
select.selectpicker('refresh');
I made the fix:
if (that.activeIndex !== that.selectedIndex && active != undefined && active.classList != undefined) {
Also i fixed
$('select[name="some"]').parents('div.bootstrap-select').find('ul.dropdown-menu.inner').html('');
+1
Released in v1.13.6!
@caseyjhol I am still seeing this error in 1.13.9 - please see this fiddle. The steps to reproduce are
Expected behavior: User can use up/down arrow keys to navigate search matches and press enter to chose one
Actual behavior: Blue highlight does not move with arrow keys, but throws error Cannot read property 'classList' of undefined. Additionally, multiple options remaining highlighting when using arrow keys and some options are skipped relative to the displayed order
Setup details
EDIT: I noticed that pulling bootstrap-select v1.13.8 from the CDN links does not have the same issue, so it appears the bug was reintroduced in the latest release
@addisonklinke I wasn't able to reproduce the error in your fiddle. I was able to reproduce the issues with highlighting the incorrect option. That was fixed in v1.13.10, though (see #1219).
Most helpful comment
@caseyjhol I am still seeing this error in 1.13.9 - please see this fiddle. The steps to reproduce are
Expected behavior: User can use up/down arrow keys to navigate search matches and press enter to chose one
Actual behavior: Blue highlight does not move with arrow keys, but throws error
Cannot read property 'classList' of undefined. Additionally, multiple options remaining highlighting when using arrow keys and some options are skipped relative to the displayed orderSetup details
EDIT: I noticed that pulling bootstrap-select v1.13.8 from the CDN links does not have the same issue, so it appears the bug was reintroduced in the latest release