We have used the OnHidden feature throughout our app to clear variables and collections as we navigate from page to page. Just recently, it seems that it may be clearing our variables as we are navigating on the same page. E.G. scrolling through a gallery and selecting different ones, seems to trigger the OnHidden function when PowerApps queries back to the DB.
This recently just started happening and only occurs when in Play mode outside of PowerApps Studio.
Thanks for the response. I understand the functionality of the OnHidden property and we are using it to clear variables after we navigate away due to sharing one screen for multiple views/functions. The issue still seems to stem from PowerApps interpreting quick navigation or scrolling of the gallery as leaving the page, ultimately executing the OnHidden function as well as the OnVisible function. Both of these functions then seem to fire off unexpectedly and have caused issues for the end-users.
Again this just started happening within the last two weeks, and only while opening the app outside of PowerApps studio. I will look into clearing context variables or other collections upon all navigation options from leaving the page.