From 554f7393ffaf2f48e30fc575cd5906b9f4ce7581 Mon Sep 17 00:00:00 2001 From: Matt Mascarenhas Date: Tue, 10 Jan 2023 12:39:06 +0000 Subject: [PATCH] cinera_search_pre.js: Fix scrolling bug This commit fixes ResizeFunction() to scroll back to the original Y position, rather than the nexus (i.e. the grid or list), after resizing the grid as a result of the window having been resized. --- cinera/cinera.c | 2 +- cinera/cinera_search_pre.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cinera/cinera.c b/cinera/cinera.c index e8d15b8..d45ba56 100644 --- a/cinera/cinera.c +++ b/cinera/cinera.c @@ -23,7 +23,7 @@ typedef struct version CINERA_APP_VERSION = { .Major = 0, .Minor = 10, - .Patch = 18 + .Patch = 19 }; #define __USE_XOPEN2K8 // NOTE(matt): O_NOFOLLOW diff --git a/cinera/cinera_search_pre.js b/cinera/cinera_search_pre.js index 1255c61..0c7ee2b 100644 --- a/cinera/cinera_search_pre.js +++ b/cinera/cinera_search_pre.js @@ -3817,6 +3817,8 @@ PseudoPushButton(Button) function ResizeFunction() { + var OriginalScrollX = scrollX; + var OriginalScrollY = scrollY; CineraProps.Orientation = GetRealOrientation(orientations.LANDSCAPE_LEFT, CineraProps.IsMobile); if(CineraProps.IsMobile) { @@ -3841,7 +3843,7 @@ ResizeFunction() PickListView(); // TODO(matt): Inform user that we've switched to the list view } - ScrollToWithOffset(Nav.Nexus, 0); + scroll(OriginalScrollX, OriginalScrollY); } UpdateButtons(); }