vanilla-nested icon indicating copy to clipboard operation
vanilla-nested copied to clipboard

Potential visual bug when deleting child item when item is not managed by vanilla nested

Open alex-benoit opened this issue 3 years ago • 0 comments

When deleting an already rendered child association (not added by vanilla nested) using the link_to_remove_nested, the library executes these lines:

https://github.com/arielj/vanilla-nested/blob/083064c6985578e1747d62b27ab05d46eaf28728/app/assets/javascripts/vanilla_nested.js#L60-L70

The issue might be that when emptying out the containing wrapper (line 67) to keep the flag to destroy the record, the containing wrapper might have some styling such as margin which will leave some phantom spacing.

What about instead doing:

wrapper.outerHTML = destroyInput; 

alex-benoit avatar Oct 25 '22 18:10 alex-benoit