Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

leave anchor scrolling on initial load to browser #692

Merged
merged 1 commit into from
May 21, 2019
Merged

Conversation

Conduitry
Copy link
Member

Fixes #331 hopefully without breaking anything else. This just sets noscroll to true during the initialization of the client-side app, so that wherever the browser decided to scroll to because of anchor fragments will be left untouched.

I don't really know what to test for this.

@Conduitry
Copy link
Member Author

Conduitry commented May 13, 2019

It might be nice to backport this to 0.25 for the benefit of people on Svelte 2. Rollupjs.org springs to mind.

edit: Although, the Rollup site is currently on 0.20 so I have no idea how much work that would be to get that up to date anyway.

@antony
Copy link
Member

antony commented May 17, 2019

@Conduitry it would be amazing if this got backported. Sadly I'm stuck on v2 for the time being, and my stakeholders can't understand why something as "simple" as anchor links don't work!

@Conduitry
Copy link
Member Author

Conduitry commented May 18, 2019

For the past couple days this change was locally made for deployments to svelte.dev and I haven't heard about any adverse effects. I think this should be good to go?

@Rich-Harris Rich-Harris merged commit bcf6ac3 into master May 21, 2019
@Rich-Harris Rich-Harris deleted the gh-331 branch May 21, 2019 02:37
@Rich-Harris
Copy link
Member

I think that's the right call, yeah. Fingers crossed this deals with it once and for all

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sapper treats anchor tag clicks as route changes
3 participants