When new fields are being produced by jQuery, the new fields doesn't work with 'enter'.
This is my script:
coffee
$('.teaser-form').keyup (e) ->
  if e.keyCode == 13
    $('.add-new-list').click()
form.haml
= f.simple_fields_for :products do |p|
  = render 'product_fields', :f => p 
.gear-item-add
  = link_to_add_association 'add item', f, :gears, class: "btn btn-default add-new-list"
So the jQuery calls onto the link_to_add_association button which creates the fields shown below. (the first field is the initial, so if I press enter, second field and third field is produced... but if I try to go on the third field and press enter, nothing happens)
_product_field.haml
.nested-fields.gear-patrol
  .col-md-12
    = f.text_field :list, class: 'teaser-form form-control', placeholder: 'testing'

 
     
     
     
     
     
    