Skip to content

Reset the sidebar scroll when mode changes. Preserve the position from #4

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dabreegster
Copy link
Collaborator

list mode.

Before: https://acteng.github.io/atip/scheme.html?authority=LAD_Adur&schema=pipeline
After: https://acteng.github.io/atip/fix_sidebar_scrolling/scheme.html?authority=LAD_Adur&schema=pipeline

Create a few interventions if needed. The list mode should need scrolling to see some of them. Scroll down and select one in the list or map. Before, the form opened up would start towards the bottom (depending how much you scrolled in list mode), and when returning to list mode, it usually resets to the top (if you scrolled up in the form to click save).

After, the scroll position is always reset to the top for opening new modes. When returning to list mode, it tries to preserve the scroll position from when you last selected an intervention (whether on the map or sidebar).

This was a complaint from LCWIP mappers, who had very very long sidebars and would lose their place when filling out the form one-by-one.

@dabreegster dabreegster marked this pull request as draft September 16, 2024 12:55
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.

1 participant