When you have a flexible content field inside another flexible content field, and you're using modals, the user gets scrolled to the wrong position when adding a new row to the nested flexible content field.
The problem seems to be caused in these lines of code in acfe-input.min.js – the user gets scrolled to the top of the outer flexible content field which is disorientating (see attached gif)
Create a field group, which is set to open in a modal. Inside the fieldgroup, create a flexible content field. Add a layout to that field, and give the layout a flexible content field. Add the fieldgroup to a post or page.
Edit the post/page, and try to add a row to the nested flexible content field, and watch the scroll position.
Expected behavior
User should be scrolled to the top of the new row they just added
Screenshots
WordPress & ACF
WordPress version: 5.8.1
ACF Pro version: 5.10.2
ACF add-ons: N/A
Description
When you have a flexible content field inside another flexible content field, and you're using modals, the user gets scrolled to the wrong position when adding a new row to the nested flexible content field.
The problem seems to be caused in these lines of code in
acfe-input.min.js
– the user gets scrolled to the top of the outer flexible content field which is disorientating (see attached gif)To reproduce
Create a field group, which is set to open in a modal. Inside the fieldgroup, create a flexible content field. Add a layout to that field, and give the layout a flexible content field. Add the fieldgroup to a post or page.
Edit the post/page, and try to add a row to the nested flexible content field, and watch the scroll position.
Expected behavior
User should be scrolled to the top of the new row they just added
Screenshots
WordPress & ACF
WordPress version: 5.8.1 ACF Pro version: 5.10.2 ACF add-ons: N/A