Skip to content

fix: hand scroll behaviour back to Nuxt so hash anchors and list scrolls work - #1207

Merged
ThibaudDauce merged 5 commits into
mainfrom
fix/scroll-behaviour
Sep 7, 2026
Merged

fix: hand scroll behaviour back to Nuxt so hash anchors and list scrolls work#1207
ThibaudDauce merged 5 commits into
mainfrom
fix/scroll-behaviour

Conversation

@ThibaudDauce

@ThibaudDauce ThibaudDauce commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The first bug was anchors in the menu of https://www.data.gouv.fr/pages/donnees-energie doing nothing, but we have a lot of weird scroll stuff because we override the Nuxt default scroll behavior. I fixed some others on the way, it should be better (and tested) now:

  • clicking an anchor in a page menu goes to the section, and opening a link with an #anchor lands on it too
  • switching tab keeps your reading position, on every tabbed page now (organizations were missing)
  • but going to another dataset from a tab still brings you back to the top
  • changing page in a list brings you to the top of the list instead of the top of the page, and leaves the page alone when that top is already on screen
  • searching, filtering or sorting brings you back to the first result
  • lists don't vanish while they reload, so the page doesn't jump around anymore

# Conflicts:
#	datagouv-components/src/components/Pagination.vue
@ThibaudDauce
ThibaudDauce merged commit bd0d9a4 into main Sep 7, 2026
11 checks passed
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 this pull request may close these issues.

2 participants