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

Fix scroll starting position on display page #319

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Fix scroll starting position on display page #319

merged 3 commits into from
Jul 16, 2024

Conversation

jlucaspains
Copy link
Owner

This pull request primarily focuses on improving the user experience on the recipe page of the application. The changes include importing the nextTick method from Vue and using it to scroll the window to the top after the recipe data has been loaded.

Here are the key changes:

  • src/pages/recipe/[id]/index.vue: Imported the nextTick method from Vue's API to ensure that certain operations are performed after the next DOM update cycle. (src/pages/recipe/[id]/index.vueL2-R2)
  • src/pages/recipe/[id]/index.vue: Added a call to nextTick followed by window.scrollTo(0, 0) in the onMounted hook. This ensures that the window is scrolled to the top after the recipe data has been loaded, providing a better user experience. (src/pages/recipe/[id]/index.vueR131-R133)

Fixes #292

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-flower-0c3edd710-319.centralus.2.azurestaticapps.net

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-flower-0c3edd710-319.centralus.2.azurestaticapps.net

Copy link

Copy link

Azure Static Web Apps: Your stage site is ready! Visit it here: https://delightful-flower-0c3edd710-319.centralus.2.azurestaticapps.net

@jlucaspains jlucaspains merged commit af32425 into main Jul 16, 2024
8 checks passed
@jlucaspains jlucaspains deleted the bugfix/292 branch July 16, 2024 23:19
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.

On open, recipes are scrolled to the bottom
1 participant