diff --git a/chosen/chosen.proto.js b/chosen/chosen.proto.js index 11e66d8..16225f4 100644 --- a/chosen/chosen.proto.js +++ b/chosen/chosen.proto.js @@ -134,7 +134,7 @@ document.observe("click", this.click_test_action); this.results_show(); } else if (!this.is_multiple && evt && (evt.target === this.selected_item || evt.target.up("a.chzn-single"))) { - this.results_show(); + this.results_toggle(); } return this.activate_field(); } else { @@ -275,6 +275,13 @@ } return this.result_highlight = null; }; + Chosen.prototype.results_toggle = function() { + if (this.results_showing) { + return this.results_hide(); + } else { + return this.results_show(); + } + }; Chosen.prototype.results_show = function() { var dd_top; if (!this.is_multiple) { @@ -752,4 +759,4 @@ return parser.parsed; }; root.OptionsParser = OptionsParser; -}).call(this); +}).call(this); \ No newline at end of file