nested_form icon indicating copy to clipboard operation
nested_form copied to clipboard

Fix for Issue #262: 'is not focusable' error

Open ghost opened this issue 11 years ago • 3 comments

link_to_delete now hides the form element and also removes the 'required' attribute on any children of the field being deleted.

field.find('*').removeAttr('required');

ghost avatar May 08 '13 22:05 ghost

Whilst waiting this JS work-around gets you going again:

$(document).on('nested:fieldRemoved', function(event){
  event.field.find('*').removeAttr('required');
});

efexen avatar May 22 '13 15:05 efexen

Could you please update Prototype version too?

lest avatar Oct 15 '13 08:10 lest

Just add this to your assets/javascripts/application.js at it will fix this:

jQuery(function ($) {
  $(document).on('nested:fieldRemoved', function (event) {
    $('[required]', event.field).removeAttr('required');
  });
});

markmcdonald51 avatar Oct 18 '16 20:10 markmcdonald51