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

Navigation scroll position reset not working on Firefox #1079

Closed
craigrileyuk opened this issue Feb 3, 2022 · 1 comment · Fixed by #1099
Closed

Navigation scroll position reset not working on Firefox #1079

craigrileyuk opened this issue Feb 3, 2022 · 1 comment · Fixed by #1099

Comments

@craigrileyuk
Copy link
Contributor

Versions:

  • @inertiajs/inertia version: 0.11.0
  • @inertiajs/inertia-vue3 version: 0.6.0

Describe the problem:

I'm having an issue with the scrolling on navigation. On Firefox, clicking an InertiaLink results in the scroll-to-top behaviour not working at all (next page loads with the user still positioned at the bottom of the page), or only climbing halfway up the page.

Steps to reproduce:

  • Create page with some decent amount of vertical height.
  • Use a persistent layout
  • Use Firefox
  • Click an Inertia link
@marcbelletre
Copy link

I can confirm the same behaviour in MS Edge.

reinink pushed a commit that referenced this issue Sep 9, 2022
Scroll position can fail to update in Firefox when setting it via `element.scrollTop` and `element.scrollLeft`. Change to preferring `element.scrollTo` with a fallback for the previous method to ensure backwards compatibility.

Resolves #1079
reinink pushed a commit that referenced this issue Sep 30, 2022
Scroll position can fail to update in Firefox when setting it via `element.scrollTop` and `element.scrollLeft`. Change to preferring `element.scrollTo` with a fallback for the previous method to ensure backwards compatibility.

Resolves #1079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants