If deselecting when Chosen is open, close it up.
This commit is contained in:
parent
3b11f2e2d1
commit
81c084ec99
|
@ -446,7 +446,10 @@
|
||||||
this.form_field.options[0].selected = true;
|
this.form_field.options[0].selected = true;
|
||||||
this.selected_item.find("span").text(this.default_text);
|
this.selected_item.find("span").text(this.default_text);
|
||||||
this.show_search_field_default();
|
this.show_search_field_default();
|
||||||
return $(evt.target).remove();
|
$(evt.target).remove();
|
||||||
|
if (this.active_field) {
|
||||||
|
return this.results_hide();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
Chosen.prototype.result_select = function(evt) {
|
Chosen.prototype.result_select = function(evt) {
|
||||||
var high, high_id, item, position;
|
var high, high_id, item, position;
|
||||||
|
|
2
chosen/chosen.jquery.min.js
vendored
2
chosen/chosen.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -434,7 +434,10 @@
|
||||||
this.form_field.options[0].selected = true;
|
this.form_field.options[0].selected = true;
|
||||||
this.selected_item.down("span").update(this.default_text);
|
this.selected_item.down("span").update(this.default_text);
|
||||||
this.show_search_field_default();
|
this.show_search_field_default();
|
||||||
return evt.target.remove();
|
evt.target.remove();
|
||||||
|
if (this.active_field) {
|
||||||
|
return this.results_hide();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
Chosen.prototype.result_select = function(evt) {
|
Chosen.prototype.result_select = function(evt) {
|
||||||
var high, item, position;
|
var high, item, position;
|
||||||
|
|
2
chosen/chosen.proto.min.js
vendored
2
chosen/chosen.proto.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -363,6 +363,7 @@ class Chosen
|
||||||
@selected_item.find("span").text @default_text
|
@selected_item.find("span").text @default_text
|
||||||
this.show_search_field_default()
|
this.show_search_field_default()
|
||||||
$(evt.target).remove();
|
$(evt.target).remove();
|
||||||
|
this.results_hide() if @active_field
|
||||||
|
|
||||||
result_select: (evt) ->
|
result_select: (evt) ->
|
||||||
if @result_highlight
|
if @result_highlight
|
||||||
|
|
|
@ -357,7 +357,8 @@ class Chosen
|
||||||
@form_field.options[0].selected = true
|
@form_field.options[0].selected = true
|
||||||
@selected_item.down("span").update(@default_text)
|
@selected_item.down("span").update(@default_text)
|
||||||
this.show_search_field_default()
|
this.show_search_field_default()
|
||||||
evt.target.remove();
|
evt.target.remove()
|
||||||
|
this.results_hide() if @active_field
|
||||||
|
|
||||||
result_select: (evt) ->
|
result_select: (evt) ->
|
||||||
if @result_highlight
|
if @result_highlight
|
||||||
|
|
Loading…
Reference in a new issue