Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

[Bug]: Klicking back button sometimes takes you back to the top

Open Arutaz opened this issue 1 year ago • 2 comments

Describe the bug

If I klick a post (that is an answer to another post), and then click the backup button, I sometimes does not get back to the position where I was in the timeline. Instead it takes me back all the way up to the top.

Does not matter if I disable streaming timeline or not.

Most of the time it does not happen, but it happen often enough to be annoying.

Steps To Reproduce

  1. Scroll down quite a bit fom the top.
  2. Click a post (not sure if it needs to be an answer to another post, or if any post will do)
  3. Click the back button
  4. Sometimes it will take you back to the position you were in the timeline, sometimes it will take you back all the way to the top

Logs and/or Screenshots

<paste your logs here>

Instance Backend

Mastodon

Operating System

GNU/Linux Debian 12

Package

Flatpak

Troubleshooting information

No response

Additional Context

Tuba v0.8.4 from flatpak

Arutaz avatar Dec 14 '24 08:12 Arutaz

I can reproduce it 100% of the time when pressing and holding the back button longer than a click but not long enough for the LongPress gesture to kick in.

This is focus related. Tuba attempts to focus on the last focused widget so you stay in place and so does libadwaita. But it looks like there's a weird issue with the back button + the animation (?)

I raised it on libadwaita's tracker and it's better to wait for Alice's insights https://gitlab.gnome.org/GNOME/libadwaita/-/issues/975

But as it stands the only thing I can probably do from Tuba's side is add a timeout so it waits a bit before attempting to focus on the last focused widget.

GeopJr avatar Dec 14 '24 14:12 GeopJr

Ah, yes that must be whats happening.

I tried what you said and it behaved like that.

A small timeout might be enough.

Thanks for your insight.

Arutaz avatar Dec 14 '24 15:12 Arutaz