Home events bug?

Hello
I have a strange problem with the event management of the app

On / route i’ve an event on pageInit that works without problem
if I navigate in some levels of the app and then use the back button to go back, the event pageInit (or pageMounted) of the / is executed even if they are still in a sub-page

Example
/ -> /sub-page/ -> /sub-page/sub-page/ -> back button -> /sub-page/ and here main page / event is executed

what am I doing wrong?

This is console when I press back /sub-page/sub-page/

but the page contained in el should not be home but /sub-page/…
obviously if I still do a back in /sub-page/ it brings me correctly to / but the pageInit/pageMounted event is no longer executed because it was already executed before

UPDATE
i’ve created a clean app and it’s the same

....
  {
    path: '/',
    component: HomePage,
  },
  {
    path: '/about/',
    component: AboutPage,
  },
  {
    path: '/about/test/',
    component: TestPage,
  },
....

when i go back from /about/test/ to /about/, pageInit of / is called in /about/

it seems that the page is correctly going back current-1, but the events called are from the current-2 page and not current-1

here a video

Because F7 preloads previous page. Check View parameters where you can disable it https://framework7.io/docs/view.html#view-parameters

thanks for support
so if I would do an action only when page is visible i should use pageAfterIn event?

Yes, or pageBeforeIn