Skip to content

Commit

Permalink
fixing iOS bug
Browse files Browse the repository at this point in the history
There is a bug in iOS when an item is selected, the control behind it
is activated
  • Loading branch information
Tony Garlanger committed Oct 24, 2014
1 parent 43141b7 commit 6a68f35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ class Chosen extends AbstractChosen

@form_field_jq.trigger "change", {'selected': @form_field.options[item.options_index].value} if @is_multiple || @form_field.selectedIndex != @current_selectedIndex
@current_selectedIndex = @form_field.selectedIndex

evt.preventDefault()
evt.stopPropagation()

this.search_field_scale()

single_set_selected_text: (text=@default_text) ->
Expand Down
3 changes: 3 additions & 0 deletions coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ class @Chosen extends AbstractChosen
@form_field.simulate("change") if typeof Event.simulate is 'function' && (@is_multiple || @form_field.selectedIndex != @current_selectedIndex)
@current_selectedIndex = @form_field.selectedIndex

evt.preventDefault()
evt.stopPropagation()

this.search_field_scale()

single_set_selected_text: (text=@default_text) ->
Expand Down

0 comments on commit 6a68f35

Please sign in to comment.