framework7 icon indicating copy to clipboard operation
framework7 copied to clipboard

Framework7 Svelte: Root page disappears on navigate back

Open erskingardner opened this issue 1 year ago • 13 comments

I'm posting here because the forum is blocking all new signups from all IP addresses.

I'm using framework7-svelte and have a page with several views (one that is set as the main view) and then pages that are loaded via routes (think whatsapp style messenger that navigates from a chats page, into a chat, and then clicking on the nav bar goes into a profile page).

  • I can navigate to a chat and back to the chats list (main view) without trouble.
  • I can navigate between tabs without trouble
  • The issue is that when I go from chats list -> chat -> chat info -> chat -> chats list. The last step animates the chat page out and shows the chats list page for a fraction of a second before completely disappearing.

There are no console errors and I can see that the page events are firing, the UI is just not being rendered properly. I've also added console logs on each route change and logged out the full route params, nothing seems amiss here. There's no difference in the params from when the page loads initially vs when it disappears.

Any ideas?

erskingardner avatar Oct 10 '24 09:10 erskingardner

I am also facing this issue after migrating to svelte 5. @erskingardner can you confirm which version of svelte are you using? If svelte 5, then this is probably related svelte 5 and a migration will be appreciated!

Muhammed-Rahif avatar Oct 25 '24 16:10 Muhammed-Rahif

I'm using svelte 5. In the end I restructured my app a bit and added some time delays in the navigation and the problem went away.

erskingardner avatar Oct 28 '24 13:10 erskingardner

I also have the same problem with Svelte 5. Could you explain what you mean by "delays"

benjvalles avatar Nov 15 '24 12:11 benjvalles

Adding delays is not working for me.

Muhammed-Rahif avatar Nov 15 '24 17:11 Muhammed-Rahif

This is still an issue, I am facing in my app. Using Framework7 version 8.3.4 as of writing this comment.

sksar avatar Apr 03 '25 10:04 sksar

I have same issue with navigate back and Svelte 5.32.1. When navigating back the previous page is appears and after a short delay the view is cleared. Anybody have some workaround?

slenz avatar May 21 '25 17:05 slenz

I have same issue with navigate back and Svelte 5.32.1. When navigating back the previous page is appears and after a short delay the view is cleared. Anybody have some workaround?

No @slenz I have not yet been able to figure out a way for this. I think the core issue is how Svelte 5 and Framework7 is interacting at the moment with the stacked routing and such. It is not an actual routing like SvelteKit, it just stacks them on top of each other and removes when fully navigated back. However something is making it such that if you go two steps in and two steps back, then it clears the view / page.

sksar avatar May 22 '25 08:05 sksar

This issue has no solution? I also have this problem.

falestra avatar May 28 '25 00:05 falestra

I think this repository is no longer being actively maintained. So this issue will persist until someone from the community picks it up and addresses these issues. Otherwise it will just keep persisting like this.

We need to probably fork the repo and create the fix PR ourselves.

sksar avatar Jun 26 '25 21:06 sksar

I think this repository is no longer being actively maintained.

That is a worst thing a developer could hear, I hope it's not the case from the officials.

Muhammed-Rahif avatar Jun 27 '25 12:06 Muhammed-Rahif

I am moving away my framwork7 projects to svelte-kit. I loved this project for a long time, but sadly it is no longer useable with all the bugs and such.

sksar avatar Jun 28 '25 17:06 sksar

I like this project because it adapts to the latest MD style and native-like style.

@sksar, are you using framework7 core in sveltekit or without framework7?

falestra avatar Jun 28 '25 21:06 falestra

I like this project because it adapts to the latest MD style and native-like style.

@sksar, are you using framework7 core in sveltekit or without framework7?

I am not using anything. I am just using plain SvelteKit with Shadcn.

However one can use KonstaUI, as it is just built with tailwindcss, but your mileage may vary. Beacuse as far as I know, it has way less features than framework7, and so I would much rather just use something more robust and modern.

sksar avatar Jun 28 '25 23:06 sksar