diff --git a/coffee/chosen.jquery.coffee b/coffee/chosen.jquery.coffee index 614eaad61df..1a99fdb0f57 100644 --- a/coffee/chosen.jquery.coffee +++ b/coffee/chosen.jquery.coffee @@ -373,7 +373,7 @@ class Chosen extends AbstractChosen this.single_set_selected_text(this.choice_label(item)) if @is_multiple && (!@hide_results_on_select || (evt.metaKey or evt.ctrlKey)) - if evt.metaKey or evt.ctrlKey or !@hide_results_on_select + if evt.metaKey or evt.ctrlKey or (!@hide_results_on_select && evt.originalEvent instanceof MouseEvent) this.winnow_results(skip_highlight: true) else @search_field.val("") diff --git a/coffee/chosen.proto.coffee b/coffee/chosen.proto.coffee index 41f53a3f25b..d11dc963279 100644 --- a/coffee/chosen.proto.coffee +++ b/coffee/chosen.proto.coffee @@ -365,7 +365,7 @@ class @Chosen extends AbstractChosen this.single_set_selected_text(this.choice_label(item)) if @is_multiple && (!@hide_results_on_select || (evt.metaKey or evt.ctrlKey)) - if evt.metaKey or evt.ctrlKey or !@hide_results_on_select + if evt.metaKey or evt.ctrlKey or (!@hide_results_on_select && evt instanceof MouseEvent) this.winnow_results(skip_highlight: true) else @search_field.value = ""