Permalink
Browse files

fix for cursor ending up in placeholder after delete click of last se…

…lection in multiple chosen
  • Loading branch information...
1 parent 6f12beb commit 35b986326e41ee94aa2d73d872b4ee4920277041 @waymondo committed Nov 15, 2012
@@ -324,6 +324,8 @@ class Chosen extends AbstractChosen
if not @is_disabled
@pending_destroy_click = true
this.choice_destroy $(evt.target)
+ this.input_blur(evt)
+ @pending_destroy_click = false
else
evt.stopPropagation
@@ -24,6 +24,7 @@ class AbstractChosen
@activate_action = (evt) => this.activate_field(evt)
@active_field = false
@mouse_on_container = false
+ @pending_destroy_click = false
@results_showing = false
@result_highlighted = null
@result_single_selected = null
@@ -55,7 +56,7 @@ class AbstractChosen
setTimeout (=> this.container_mousedown()), 50 unless @active_field
input_blur: (evt) ->
- if not @mouse_on_container
+ if not @mouse_on_container or @pending_destroy_click
@active_field = false
setTimeout (=> this.blur_test()), 100

0 comments on commit 35b9863

Please sign in to comment.