Don't allow group name clicks in jQuery version.

abstract-chosen
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) {
var target;
target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
if (target) {
if (target.length) {
this.result_highlight = target;
return this.result_select();
}

View File

@ -297,7 +297,7 @@ 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
if target.length
@result_highlight = target
this.result_select()