Reset the sidebar scroll when mode changes. Preserve the position from #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.