Skip to content

[Due for payment 2026-12-08] Fix zoomed attachment not panning horizontally after a slow vertical pinch #108010

Todo

Description

@mountiny

Problem

On web (tested on iOS mWeb Safari), zooming into an image attachment with a slow vertical pinch leaves the image stuck. The image can no longer be panned horizontally and the attachment carousel stops paging until the page is reloaded. The cause is the swipe down to close logic in useCanvasPanGesture. It only looks at the first touch and ignores how many fingers are down, so a slow vertical pinch sets isSwipingDownToClose. Only the snap-back spring animations reset that flag, and a pinch ends on a path that runs no spring, so the flag stays set.

Solution

Skip the swipe down check while more than one finger is down, because swipe down to close is a one-finger gesture. Also reset isSwipingDownToClose on the three exits from the gesture that do not run a snap-back spring, so the flag can no longer outlive the gesture. A one-finger swipe down behaves as before.

PR

#108008

Issue OwnerCurrent Issue Owner: @ikevin127

Activity

  1. added
    Reviewing
    Weekly
    on Nov 25, 2026
  2. added
    Daily
    and removed
    Reviewing
    Weekly
    on Dec 1, 2026
  3. changed the title [-]Fix zoomed attachment not panning horizontally after a slow vertical pinch[/-] [+][Due for payment 2026-12-08] Fix zoomed attachment not panning horizontally after a slow vertical pinch[/+] on Dec 1, 2026
  4. melvin-bot commented on Dec 1, 2026

    @melvin-bot

    @ikevin127

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.55-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-12-08. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

  5. ikevin127 commented on Dec 1, 2026

    @ikevin127
    Contributor

    Contributor+ Checklist:

    • [Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to the comment on the PR: https://github.com/Expensify/App/pull/37080/changes#r4749033357
      Link to the comment on the Issue: N/A

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    1. Open a chat that has at least two image attachments.
    2. Tap an image to open the attachment view.
    3. With the image not zoomed, put two fingers on it, one above the other, and slowly spread them apart vertically to zoom in.
    4. Drag the zoomed image left and right with one finger.
    5. Verify that the image pans horizontally and follows the finger.
    6. Double tap to zoom back out.
    7. Swipe left or right.
    8. Verify that the carousel moves to the other attachment.

    Do we agree 👍 or 👎.

  6. added
    Weekly
    and removed
    Daily
    on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Weekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions