Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Pinch to zoom gesture in image viewer does not work consistently #900

Open
TriVoxel opened this issue Apr 12, 2024 · 7 comments · May be fixed by #955
Open

[Bug]: Pinch to zoom gesture in image viewer does not work consistently #900

TriVoxel opened this issue Apr 12, 2024 · 7 comments · May be fixed by #955
Labels
bug Something isn't working

Comments

@TriVoxel
Copy link

Describe the bug

Sometimes I can use the touchpad pinch to zoom feature to zoom an image, sometimes not.

Steps To Reproduce

  1. Click an image to enlarge
  2. Use a reverse pinch gesture on your touchpad to zoom in

Logs and/or Screenshots

No response

Instance Backend

Mastodon

Operating System

Fedora Silverblue

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime)
prefix: /app
flatpak: true
version: 0.7.2 (production)
gtk: 4.14.1 (4.14.1)
libadwaita: 1.5.0 (1.5.0)
libsoup: 3.4.4 (3.4.4)
libgtksourceview: 5.12.0 (5.12.0)

Additional Context

If it isn't working, I can drag around with my mouse and sometimes get it out of this state where I can't use a zoom gesture. Not entirely sure what causes it yet, but there's a 50/50 chance touchpad gestures work when I open Tuba.

@TriVoxel TriVoxel added the bug Something isn't working label Apr 12, 2024
@GeopJr
Copy link
Owner

GeopJr commented Apr 12, 2024

Not sure if #902 #899 had something to do with it as well, I can't really reproduce it but in general you have to be very precise because there are too many gestures:

  • The media viewer's swipe down to dismiss one
  • The carousel's swipe horizontally to move images
  • The carousel children/images' pinch to zoom and others

If while trying to pinch, you trigger the media viewer's swipe down accidentally, then that's the one that will happen

I think #902 will probably fix it, if you are keen to using devel builds, feel free to try it!

@TriVoxel
Copy link
Author

TriVoxel commented Apr 13, 2024

Here are steps to easily reproduce 100% of the time:

  1. Click an image to open the image viewer
  2. Immediately close the image using the two finger swipe down gesture
  3. Repeat step 1-2 about 5-10 times. Make sure you are quick on step 2
  4. Open the image once again
  5. Pinch to zoom (should not work)

Additional notes:

If you do step 1-2 slowly, it will not happen. It seems like has something to do with clicking the image multiple times until it re-opens the image viewer which causes this. I basically spam left click as soon as I dismiss the image with the gesture until it re-opens. I also tend to close the image before the loading spinner disappears. This seems to be the best way to produce the issue. This obviously isn't how I normally get into this state, but it is a consistent way to do it in my testing. Perhaps I sometimes double click on an image? Unsure...

Workaround:

  1. Double-click the image to zoom in. The gesture should work now.
  2. Click and drag down to close the image viewer. The gesture should work now.

@TriVoxel
Copy link
Author

Confirmed to still be an issue in main

Tested:

os: GNOME 46 (Flatpak runtime)
prefix: /app
flatpak: true
version: main-f5bd1c9 (development)
gtk: 4.13.9 (4.13.9)
libadwaita: 1.5.0 (1.5.0)
libsoup: 3.4.4 (3.4.4)
libgtksourceview: 5.11.2 (5.11.2)

@GeopJr
Copy link
Owner

GeopJr commented Apr 13, 2024

I see, thanks for the reproduction, I was able to reproduce it on main but not on the PR. You also tested on main but that PR wasn't merged yet! Sorry for not being very clear about it!

Let me merge it and let me know if you can reproduce it again! (If you have cloned the repo locally, do git pull to get the latest version of the repo)

@TriVoxel
Copy link
Author

I see, thanks for the reproduction, I was able to reproduce it on main but not on the PR. You also tested on main but that PR wasn't merged yet! Sorry for not being very clear about it!

Let me merge it and let me know if you can reproduce it again! (If you have cloned the repo locally, do git pull to get the latest version of the repo)

It's actually worse in the new PR. It still happens, but I can't get it un-stuck by double-clicking to zoom, or by dragging with left click to close the image viewer.

On a brighter note, great work with the left/right scroll for image galleries! Fantastic! Feels good.

@TriVoxel
Copy link
Author

What's odd: the rest of the gestures work perfectly fine. Scrolling left/right in the photo gallery works, scroll down to dismiss image viewer works, scroll left to right to go back in a leaflet works perfectly fine... literally all the other gestures work fine for me. I only have issues with the pinch to zoom.

@GeopJr
Copy link
Owner

GeopJr commented May 26, 2024

Could you give #955 a try? (still cant reliably reproduce it :/)

@GeopJr GeopJr linked a pull request May 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants