Don't allow group name clicks in jQuery version.

This commit is contained in:
Patrick Filler 2011-07-19 15:59:08 -04:00
parent 7a4c7439df
commit 6247674d71
2 changed files with 2 additions and 2 deletions

View file

@ -340,7 +340,7 @@
Chosen.prototype.search_results_click = function(evt) { Chosen.prototype.search_results_click = function(evt) {
var target; var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first(); target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target) { if (target.length) {
this.result_highlight = target; this.result_highlight = target;
return this.result_select(); return this.result_select();
} }

View file

@ -297,7 +297,7 @@ class Chosen
search_results_click: (evt) -> search_results_click: (evt) ->
target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first() target = if $(evt.target).hasClass "active-result" then $(evt.target) else $(evt.target).parents(".active-result").first()
if target if target.length
@result_highlight = target @result_highlight = target
this.result_select() this.result_select()