voyager icon indicating copy to clipboard operation
voyager copied to clipboard

Page Scroll Position Not Changed After Changing Post/Comment Sort

Open mdecourcy opened this issue 2 years ago • 0 comments

Issue Description:

When using the sorting feature to change the order of posts or comments on wefwef, the scroll position of the page remains the same as it was before the sort change. This behavior can lead to a poor user experience, as the user is expecting a change of context within the page and have to manually scroll back to the top.

Environment:

  • macOS chromium/ff
  • Android 13: chromium/ff

Proposed Solution:

In wefwef/src/TabbedRoutes.ts there is a function “scrollUpIfNeeded”. Proposing pulling this out into a helper and utilizing it as needed. Direct link to function: https://github.com/aeharding/wefwef/blob/5b254b7a956b3699de54e42dbbd36ff1362950a9/src/TabbedRoutes.tsx#L139C3-L168C1

mdecourcy avatar Jul 05 '23 03:07 mdecourcy