sveltejs / sapper

The next small thing in web development, powered by Svelte
https://sapper.svelte.dev
MIT License
7k stars 434 forks source link

Sapper renders the page twice #1704

Open retraigo opened 3 years ago

retraigo commented 3 years ago

Whenever I switch between mobile and desktop site, I get an issue where the page is rendered again after the bottom of the page.

(eg)

header
body (with client side stuff)
footer
header (duplicate)
body (without client side stuff)
footer (duplicate)

The duplicate part is non-functional, ie, scripts do not get executed there. I'm using the sapper template and I'm kinda new to sapper, so I appreciate help.

Edit:

To reproduce this, it happens even when I run the plain sapper template without modifying it. (clone the sapper template repo & run dev/start it)

antony commented 3 years ago

How similar to this issue https://github.com/sveltejs/sapper/issues/1725 does this seem to you? Is it all elements? Or is it just a subset?

retraigo commented 3 years ago

How similar to this issue #1725 does this seem to you? Is it all elements? Or is it just a subset?

The entire page gets repeated, with all elements. The repeated part, however, does not function (ie, no javascript event works) and looks like a static page.

As for similarity with #1725, I think it's almost the same. Tested the issue in many different browsers. It seems to not affect firefox, but still gets duplicated in all chromium-based browsers.