Open MarcoBeni opened 3 years ago
Hi, thanks for your report! I can confirm and replicate the problem: It seems like ACF is instantiating a new editor as soon as the view is switched. That's why it works on the initial load if the editor is already there. Unfortunately I haven't found an event or hook, that let's me re-init autosize at the correct moment. But, I also haven't much experience with gutenberg blocks up until now. So maybe in the future I will find a way, but right now I don't really have a good solution, sorry.
Hi, ACF autosize work really well on standard metabox but if a textarea or wyiswyg fileld are included in ACF Block the autosize function doesn't work properly, it works only on first field load and only if block is in "edit mode". If user switch from edit to preview and to edit again iframe lose all class and data-attr, and the resize doesn't work.
https://user-images.githubusercontent.com/61742232/119677232-d6725900-be3e-11eb-871f-b804b91ea8c9.mp4
Thank you so much for your work and have a nice day