Maprunner / rg2

Updated user interface for Routegadget
MIT License
36 stars 20 forks source link

Remember scroll bar location when changing tabs #481

Closed jrgparkinson closed 3 years ago

jrgparkinson commented 3 years ago

The tabs on the left hand side scroll vertically when the contents is long, e.g. when there are many events.

When switching tabs, e.g. between Events, Courses, or Results, the position of the scroll bar is reset. E.g. if the user had scrolled down to the bottom event, clicked on it, then gone back to the events tab, the scroll bar would be reset to the top of the events list.

With this change, the scroll position is remembered for each tab between switching by saving the scroll position for each tab as an attribute of the tab contents div.

Also adding some instructions for installing/running rg2 locally as I couldn't find any and it might save someone else a bit of googling.

Maprunner commented 3 years ago

Thanks for this. Finally found some time to merge in and should be able to install it on all routegadget.co.uk sites someone this weekend.