-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty select refresh error "Cannot read property 'classList' of undefined" #2189
Comments
I made the fix: if (that.activeIndex !== that.selectedIndex && active != undefined && active.classList != undefined) { |
Also i fixed
It will be create if he did it himself automatically. $('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 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). |
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');
The text was updated successfully, but these errors were encountered: