Support

Account

Home Forums Gutenberg The scroll position when an ACF block switches modes (from edit to preview)

Unread

The scroll position when an ACF block switches modes (from edit to preview)

  • Hi ACF forum,

    I have a kind of complex ACF block that includes a repeater field, so editing it can mean it takes up a lot of vertical space in the editor. The problem I’m looking to solve is when clicking away from editing, the block collapses to a much smaller sized preview. What can end up happening is the browser’s scroll position remains set to a location far below where the block is positioned, if the editor had scrolled down to the bottom of the block’s edit interface.

    This behavior can be disorienting and makes editing a complex page with many of these blocks much more time consuming, by repeatedly scrolling up and down the page after editing each element.

    My question is about how to approach this:
    1. Accept that this is an edge case I should solve for myself using the JavaScript API. Is there an event I could respond to? Something like changemode? I’d appreciate any pointers here.
    2. Suggest that this behavior is worth fixing within the ACF plugin. Should I post this in the Bug Reports forum? I can come up with a more concrete example that illustrates the problem.

    Thanks in advance,
    Dan

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.