Permalink
Browse files

Merge pull request #414 from fatfreecrm/fix_mousedown_event

Don't stop mouse event propagation if results are showing.
  • Loading branch information...
2 parents ad88217 + beecc74 commit f815bb8da9553894aef612d013625d0e39edb0a0 @pfiller pfiller committed Mar 12, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 coffee/chosen.jquery.coffee
  2. +1 −1 coffee/chosen.proto.coffee
@@ -108,7 +108,7 @@ class Chosen extends AbstractChosen
container_mousedown: (evt) ->
if !@is_disabled
target_closelink = if evt? then ($ evt.target).hasClass "search-choice-close" else false
- if evt and evt.type is "mousedown"
+ if evt and evt.type is "mousedown" and not @results_showing
evt.stopPropagation()
if not @pending_destroy_click and not target_closelink
if not @active_field
@@ -101,7 +101,7 @@ class Chosen extends AbstractChosen
container_mousedown: (evt) ->
if !@is_disabled
target_closelink = if evt? then evt.target.hasClassName "search-choice-close" else false
- if evt and evt.type is "mousedown"
+ if evt and evt.type is "mousedown" and not @results_showing
evt.stop()
if not @pending_destroy_click and not target_closelink
if not @active_field

0 comments on commit f815bb8

Please sign in to comment.