Skip to content

Fix fast pinch-zoom snapping back to 1x mid-gesture - #95

Merged
Chethan616 merged 1 commit into
mainfrom
v5.2
Oct 20, 2026
Merged

Chethan616 merged 1 commit into
mainfrom
v5.2

Conversation

@Chethan616

Copy link
Copy Markdown
Owner

What changed?

The pinch/pan gesture handler on the PDF page surface never consumed pointer events. They also reached a sibling detectTapGestures on the same surface, which independently watches for double-taps and resets zoom to 1x on one. A fast pinch — where the touchscreen can briefly report fingers as separate down/up pairs — could get misread there as a double-tap, firing the reset mid-pinch.

Fixes #93. Likely also what #92 was seeing (zoom "resetting" while reading) since zoom is a single document-level value that already persists across page scrolling by design — there's no separate per-page reset path.

How was it checked?

  • ./gradlew :app:compileFossDebugKotlin
  • Known limitations: not reproduced on a physical device matching the reporter's (Poco F5); fix targets the mechanism described, not a byte-for-byte repro.

Checklist

  • Selected documents remain local; any new network behavior is explicit and documented.
  • Existing offline workflows remain usable where intended.
  • Light and dark themes, accessibility, and performance were considered.
  • Documentation and third-party notices were updated where needed.
  • No secrets, private documents, APKs, keystores, or build outputs are included.

The pinch/pan gesture handler never consumed pointer events, so they
also reached the sibling double-tap detector on the same surface. A
fast pinch, where fingers briefly report as separate down/up pairs,
could register there as a double-tap, whose reset-to-1x handler fired
mid-pinch. Consume events once a second finger is down or a real
zoom/pan is in progress so the tap detector never sees them.
@Chethan616
Chethan616 merged commit 32721d5 into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: when you do zoom and move faster your finger the zoom go back

1 participant