Skip to content

Commit

Permalink
Use .get(0) for DOM element for $.contains() in mouseout callback
Browse files Browse the repository at this point in the history
The first argument to $.contains() must be a DOM element. it cannot be
a jQuery object.
  • Loading branch information
Steven Xu committed Dec 22, 2016
1 parent 93bea6a commit e60af13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class Chosen extends AbstractChosen

search_results_mouseout: (evt) ->
if $(evt.target).hasClass "active-result" or $(evt.target).parents('.active-result').first()
if not (@result_highlight and $.contains(@result_highlight, $(evt.relatedTarget)))
if not (@result_highlight and $.contains(@result_highlight.get(0), evt.relatedTarget))
this.result_clear_highlight()

choice_build: (item) ->
Expand Down

0 comments on commit e60af13

Please sign in to comment.