Need Help Preventing Accordion Scroll-to-Top Behavior in Ionic React

Hey everyone,

I’ve encountered a bit of a snag while working with Ionic React, particularly regarding accordion functionality. Here’s the scenario: I’m implementing a feature where I have a list of accordion elements with various fields. When I scroll down to a point where the accordion headers are no longer visible and then click outside the accordion or its content, the page scrolls back to the top of the component. This behavior is not desired.

I’ve tried to find a workaround for this issue, but haven’t had much luck so far. I’m wondering if anyone else has encountered a similar problem and found a solution to prevent the scroll-to-top behavior when clicking outside the accordion or its content.

To better illustrate the problem, I’ve prepared a code example on StackBlitz: Example Code

I would greatly appreciate any insights or suggestions on how to address this issue. Thanks in advance for your help!