Skip to main content
Scott24
New Member
August 24, 2023
Question

Reset scroll position of an overlay when closing

  • August 24, 2023
  • 13 replies
  • 1391 views

Hi all,

I’ve been running into a scroll position issue since state management was introduced.

I have a page with various buttons, and when selected, opens an overlay. These overlays have scrollable content on them, allowing the user to view the content. If the content has been scrolled and the overlay closed, when reopening the overlay the scroll position hasn’t been reset.

I have the option to ‘reset scroll position’ on the button-to-overlay interaction, but this resets the main page and there is no 'reset scroll position on the ‘close overlay’ menu interaction.

I ran a test there the overlay was treated as a new page (so ‘navigate to’ instead of ‘open overlay’) and the ‘back’ interaction on the overlay has the option to reset and behaves as expected.

What am I doing wrong? I know the state management setup indicates that layers need to be named the same, but this is to maintain scroll position. I need to reset the scroll position on the overlay once it has been closed.

Thanks

This topic has been closed for replies.

13 replies

Jon_Dean
New Member
July 2, 2025

Same issue. Figma please replay with a recommendation. 

JP112
New Participant
July 2, 2025

Hey All,

My guess is that you could create a Variant set up with your overlay. One state with your overlay content and another state would be blank & transparent or what ever. When you set up your “Click” to close the overlay, also set up a “Change to” to change the overlay variant to the blank state. When you do this you can also reset the scroll state on the inital Overlay state. Then add a “Delay” on the blank state to “Change to” the original state. 

Let me know if it works :)

JP

JP112
New Participant
July 2, 2025

I just tested out my suggestion above and it works like a charm.