Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll back to to first section after page refresh #355

Open
Kiran-Wicksteed opened this issue Oct 21, 2022 · 1 comment
Open

Scroll back to to first section after page refresh #355

Kiran-Wicksteed opened this issue Oct 21, 2022 · 1 comment
Labels
question Further information is requested

Comments

@Kiran-Wicksteed
Copy link

Hi there!

I have a Next.js build using custom validation to control the user's movement between sections. (it's a quiz)

The problem is that when the page is refreshed, all state data is lost breaking the dynamic content generated based on interactions in previous sections. I'd like it so that when the user refreshes their browser, they are returned to #Section1

I've tried the methods in the docs and they work momentarily after refresh, but then react-fullpage quickly slides back down to the side the user was on before refresh. I wonder if this is to do with the anchor tag in the URL?

Please help me understand what I'm missing here.

Cheers!

@alvarotrigo
Copy link
Owner

If you use anchors this shouldn't be an issue.

See this example and refresh when in other sections:
https://alvarotrigo.com/fullPage/#page2

@alvarotrigo alvarotrigo added the question Further information is requested label Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants