redking / chosen-dojo

Dojo Port of Chosen (https://github.com/harvesthq/chosen)
http://vafada.github.com/chosen-dojo/
Other
4 stars 5 forks source link

Chosen would fail when being applied to a disabled <select> #1

Closed simmerer closed 10 years ago

simmerer commented 10 years ago

Calling this.selected_item_focus_handle.remove() only makes sense if this.selected_item_focus_handle exists in the first place. The if statement on line 774 had this logic backwards.

This error: screen shot 2014-03-26 at 3 05 04 pm would appear when applying Chosen to a disabled select element.

Simply removing the ! fixed it right up.

redking commented 10 years ago

Thanks! This would have been an issue with the master, as I just converted the code to AMD, with a few changes. I plan to pull in upstream changes shortly and then give the code a good look over + unit tests; should avoid most issues like this.

Thanks again!

simmerer commented 10 years ago

Happy to help. Thanks for all your work so far on this project - it's been very useful.