Skip to content

Commit

Permalink
result_select caused error because of missing argument
Browse files Browse the repository at this point in the history
  • Loading branch information
koenpunt committed Aug 25, 2013
1 parent 6d75c6d commit 1f708b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ class Chosen extends AbstractChosen
select_append_option: ( options ) ->
option = $('<option />', options ).attr('selected', 'selected')
@form_field_jq.append option
terms = @search_field.val()
@form_field_jq.trigger "chosen:updated"
@form_field_jq.trigger "change"
@search_field.trigger "focus"
Expand Down
5 changes: 3 additions & 2 deletions coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,9 @@ class @Chosen extends AbstractChosen
option = @new_option_temp.evaluate( options )
@form_field.insert option
Event.fire @form_field, "chosen:updated"
@form_field.simulate("change") if typeof Event.simulate is 'function'
this.result_select()
if typeof Event.simulate is 'function'
@form_field.simulate("change")
@search_field.simulate("focus")

no_results_clear: ->
nr = null
Expand Down

0 comments on commit 1f708b9

Please sign in to comment.