JS HTMLSnippet script lost when I navigate back

Hi,   I have a simple JS piece that works on my grid page (just a console log message added in HTMLSnippet add-on; I run the app locally). However, when I navigate to the edit page from the grid page and click on cancel changes button I go back to the grid page and the script is lost. I have to reload the page to make it available again. How to make the script load again when I navigate back?   Thanks, Karol
1 answers

I was able to get this to work by using the Javascript Snippet here: https://appstore.home.mendix.com/link/app/43096/Incentro-Business-Acceleration/JavaScript-Snippet and the edit page was not a popupLayout