cgeo
cgeo copied to clipboard
Listing view jumps to top after editing cache note
Describe your problem!
Every time after completing an edit to the personal cache note by clicking the OK button, the cache listing jumps to the top. This is extremely annoying on a long cache listing for example for a long multi (and these are the caches where the cache note is used most).
How to reproduce?
See above. Happens every time.
Actual result after these steps?
No response
Expected result after these steps?
No response
Reproducible
Yes
c:geo Version
2024.04.25
System information
No response
Additional Information
No response
Not sure if this can be fixed: On finishing edit note, a "geocache has changed" notification is broadcast to inform all (interested) parts of c:geo that something of this cache has changed. This triggers a complete reload of the cache details page, though, which means page starts from the top. But notification is necessary to inform other tabs (eg: waypoints) as well as other activities that may lay further down in the activity stack about those changes.
But there is an easy workaround: Use "personal note" menu entry, which directly opens the personal note editor.
Thanks for the information. But I don't think this problem existed in the past? I think it was introduced only a few weeks/months ago. Could you not store the current vertical scrolling state in some variable before broadcasting the notification, and then restore that scrolling state after the reload?
But my preferred fix would be this: Put the personal cache note on its own tab. Then one could simply swipe left/right to change between listing and note. This way it would be at least less annoying that the listing resets itself to the top every time. And this would be really useful in its own right for long multis (read stage description in listing, swipe right, make notes for that stage, swipe left, read next stage, swipe right, etc.).
We have the exact same annoyance (see #15705), plus that this also happens after clicking the Add/Update Waypoints
button.
To invent a dedicated PN page sounds like a good idea for looong PNs, and TBH I really liked it on first sight, but although this would be really good in these "long" cases, it would mean a lot of wasted space and a kind of dumb looking empty page for about 90 % of the caches (most probably even more), which just have a pretty short or even no PN at all.
@moving-bits What about scrolling to the very end of the listing page? Would this be possible?
@moving-bits What about scrolling to the very end of the listing page? Would this be possible?
PR #15713 gives this a try
Sorry to say so, but this did not make much of a difference.
After editing the PN or clicking Add/Update waypoints
the window still scrolls up to a seemingly random position, somewhere in the middle of the listing.
Still happens ... and is really annoying, if you're on the way with longer listing and/or PN ...