[SOLVED] BeforeLeave fires when I click on a standalone autocomplete (v.5.0.0)

I’m days trying to solve this issue. I created a jsfiddle.

After navigate from page1 to page2, if I click on my standalone autocomplete, the app executes the “beforeLeave” event, instead of open the autocomplete.

Thank you for your support

here => https://jsfiddle.net/mzrsc9tb/3/

  routableModals: false

if you want to keep it ‘routable’:
v5 => check the ‘routeTo’ ARGV on beforeLeave.
v6 => check the ‘to’ ARGV on beforeLeave.

v5 => Routes | Framework7 Documentation
v6 => Routes | Framework7 Documentation

1 Like

You saved me! Thank you so much. So, routableModals is set to true by default, and this parameters allow to close the popup like a go back event. For this reason, it activates the “before leave” event?

yes on v5, no on v6

not really, read this section on ‘routableModals’ => Routes | Framework7 Documentation

simply because when you are ‘routing’ to a diff route (popup), you are ‘leaving’ the current route.

1 Like