diff --git a/chosen/chosen.jquery.js b/chosen/chosen.jquery.js index c38ae81..3866e17 100644 --- a/chosen/chosen.jquery.js +++ b/chosen/chosen.jquery.js @@ -152,6 +152,7 @@ $(document).click(this.click_test_action); this.results_show(); } else if (!this.is_multiple && evt && ($(evt.target) === this.selected_item || $(evt.target).parents("a.chzn-single").length)) { + evt.preventDefault(); this.results_show(); } return this.activate_field(); diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index b440f6c..e6f10f7 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -134,6 +134,7 @@ class Chosen $(document).click @click_test_action this.results_show() else if not @is_multiple and evt and ($(evt.target) is @selected_item || $(evt.target).parents("a.chzn-single").length) + evt.preventDefault() this.results_show() this.activate_field() @@ -307,7 +308,6 @@ class Chosen search_results_click: (evt) -> target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first() if target - # TODO fix @result_highlight = target this.result_select()