stash icon indicating copy to clipboard operation
stash copied to clipboard

Add swipe navigation to lightbox

Open sezzim opened this issue 2 months ago • 3 comments

Adds swipe navigation to the lightbox on touch devices. Changes the panning behavior to interrupt panning when the edge of the image is reached. In the implementation, an X/Y position of zero now means centered, and a non-zero position is an offset from that.

Relevant to #2538, but that asks for more than just swipe.

Separate from this PR, I have changes to auto-hide the lightbox controls, and to control wake lock, if that is of interest.

sezzim avatar Oct 26 '25 03:10 sezzim

Thank you for your submission and apologies for the lateness in reviewing this.

I'm running into some issues with this on Chrome on my Android device. Swiping left and right seemed to sometimes not work. It would work for a run of images then it swiping would just stop responding. I also noticed that its no longer possible to navigate left and right by tapping the image.

Separate from this PR, I have changes to auto-hide the lightbox controls, and to control wake lock, if that is of interest.

This is indeed of interest.

WithoutPants avatar Nov 18 '25 03:11 WithoutPants

I think the onTouch handlers I added are interacting badly with the existing onPointer handlers. I will work on fixing it.

sezzim avatar Nov 27 '25 06:11 sezzim

Updated. I think this is better, but the consolidation also increases the risk of breakage.

sezzim avatar Dec 08 '25 04:12 sezzim