Skip to content

Commit

Permalink
Merge pull request harvesthq#414 from fatfreecrm/fix_mousedown_event
Browse files Browse the repository at this point in the history
Don't stop mouse event propagation if results are showing.
  • Loading branch information
pfiller committed Mar 12, 2012
2 parents ad88217 + beecc74 commit f815bb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f815bb8

Please sign in to comment.