You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using Chosen's search box causes images to disapeer until dropdown is reopened #29
If you go to http://testing.mcresourcecalculator.info/ and choose "Minecraft Forge" in the first drop down, then enter 'Water' into the search box of the second drop-down, the water icon disappears until you close the drop down. Clearing the search box does not restore the images either. I'm using Image-Select 1.7 with Chosen 1.5.1, jQuery 2.2.3
Is there something new on this?
Images also disappear if the search box is disabled but the user presses some keys. Only up/down are working as they are proper inputs to navigate the list items.
Hi, I thought I would help out. I am using this plugin here: http://websemantics.github.io/Image-Select/. So for me I like that plugin but same issue the image would disappear after searching. I am capable of programming although not setup for this hard core debugging. In any case I managed to make the image come back after the search. It works.. because I can do it.
You have to hack the chosen.jquery.js. You can minimize it afterwords if you want.
Ok, so the file ImageSelect.jquery.js already has a "chosen:filter" event listener in place. So I added in a trigger for the filter event. Then it simply calls the the function in the ImageSelect file after the search result is updated. Keep in mind I am not taking into account groups or anything like that ok. This is just for my needs and maybe this will work fine for you as well.
Look for the function below and replace it with this. Version 1.8.2, chosen.jquery.js.
I am sure there is some genius to make this all work better but this works for me.
Chosen.prototype.update_results_content = function(content) {
this.search_results.html(content);
return this.form_field_jq.trigger("chosen:filter", { //9-29-17 added in to replace images after search.
chosen: this
});
};
I don't have time for a jsfiddle. Hope this helps you. It is super easy to do but took several hours to figure out. I did make custom css for my needs but you can hack that as well. Take it easy.
Activity
iLLysion commentedon May 23, 2016
I have the same issue
websemantics commentedon May 27, 2016
This has been an issue with Chosen for a while, check #19 .. there is a pending fix harvesthq/chosen#2373 .. I've asked for an update, stay tuned,
iamcal commentedon Sep 20, 2016
fix will now be either harvesthq/chosen#1626 or harvesthq/chosen#2356
maybe. one day.
websemantics commentedon Sep 20, 2016
Thanks for the update @iamcal
donni106 commentedon May 19, 2017
Is there something new on this?
Images also disappear if the search box is disabled but the user presses some keys. Only up/down are working as they are proper inputs to navigate the list items.
shablam commentedon Sep 30, 2017
Hi, I thought I would help out. I am using this plugin here: http://websemantics.github.io/Image-Select/. So for me I like that plugin but same issue the image would disappear after searching. I am capable of programming although not setup for this hard core debugging. In any case I managed to make the image come back after the search. It works.. because I can do it.
You have to hack the chosen.jquery.js. You can minimize it afterwords if you want.
Ok, so the file ImageSelect.jquery.js already has a "chosen:filter" event listener in place. So I added in a trigger for the filter event. Then it simply calls the the function in the ImageSelect file after the search result is updated. Keep in mind I am not taking into account groups or anything like that ok. This is just for my needs and maybe this will work fine for you as well.
Look for the function below and replace it with this. Version 1.8.2, chosen.jquery.js.
I am sure there is some genius to make this all work better but this works for me.
I don't have time for a jsfiddle. Hope this helps you. It is super easy to do but took several hours to figure out. I did make custom css for my needs but you can hack that as well. Take it easy.