websemantics / Image-Select

Image Select is an extension of Chosen, a jQuery plugin that makes long, unwieldy select boxes much more user-friendly. It provides image support for Single and Multi select HTML tags.
http://websemantics.github.io/Image-Select
MIT License
148 stars 44 forks source link

chosen:hiding_dropdown is swapping images when selecting nothing #17

Closed VPagani closed 8 years ago

VPagani commented 9 years ago

There is an issue with the selected option when hiding dropdown that causes the image of the last selected option to be changed to the image of the first selected option. The thing is that the first selected option is considered as the :selected JQuery Object and uses its data-img-src as the image to be inserted on a span. And the span that is selected to be inserted the image is the last one. So basically, when you open the dropdown, selects nothing, an closes it, it will pick the first option image and insert on the last option. Always. See the example below: imageselect-plugin-issue

websemantics commented 9 years ago

@VPagani, thanks for a model bug report :) .. will definitely look into it shortly

websemantics commented 8 years ago

Fixed, https://github.com/websemantics/Image-Select/releases/tag/1.4