Skip to content
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

Make hide_results_on_select option apply for deselecting as well #2924

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Expand Up @@ -325,7 +325,7 @@ class Chosen extends AbstractChosen
else
this.show_search_field_default()

this.results_hide() if @is_multiple and this.choices_count() > 0 and this.get_search_field_value().length < 1
this.results_hide() if @is_multiple and this.hide_results_on_select and this.choices_count() > 0 and this.get_search_field_value().length < 1

link.parents('li').first().remove()

Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Expand Up @@ -317,7 +317,7 @@ class @Chosen extends AbstractChosen
else
this.show_search_field_default()

this.results_hide() if @is_multiple and this.choices_count() > 0 and this.get_search_field_value().length < 1
this.results_hide() if @is_multiple and this.hide_results_on_select and this.choices_count() > 0 and this.get_search_field_value().length < 1

link.up('li').remove()

Expand Down