Skip to content

fix: support pinch-to-zoom and drag-to-pan in lightbox#1957

Open
Cao1224 wants to merge 2 commits into
session-foundation:devfrom
Cao1224:fix-issue-701
Open

fix: support pinch-to-zoom and drag-to-pan in lightbox#1957
Cao1224 wants to merge 2 commits into
session-foundation:devfrom
Cao1224:fix-issue-701

Conversation

@Cao1224

@Cao1224 Cao1224 commented Jun 28, 2026

Copy link
Copy Markdown

Hi @Bilb — this is my first contribution to this project. I've fixed #701 by adding pinch-to-zoom and drag-to-pan to the Lightbox image viewer. Would appreciate a review when you have time!

First time contributor checklist:

Contributor checklist:

Description

Adds pinch-to-zoom and drag-to-pan to the Lightbox image viewer. Images containing text are often difficult to read at fit-to-screen size, requiring users to download and open them externally to inspect the content.

How it works:

  • Pinch or Ctrl+scroll to zoom in and out toward the pointer position
  • Drag to pan while zoomed
  • Double-click to reset to fit-to-screen
  • Zoom and pan reset automatically when navigating to the next or previous image
  • Video and unsupported file types are unaffected

Manual testing performed:

  • Pinch-to-zoom on Mac trackpad — zooms toward pointer
  • Ctrl+scroll on Mac — zooms in and out
  • Drag while zoomed — pans without closing the lightbox
  • Double-click — resets to fit-to-screen from any zoom level
  • Click dark background — closes the lightbox at any zoom level
  • Click image without dragging — lightbox stays open
  • Navigate prev/next — zoom resets on each new image
  • Video attachments — no change in behavior

No new automated tests added — the meaningful behavior (gesture feel, pointer anchoring, click vs drag distinction) is covered by manual testing above.

OS tested: macOS [14.8.7]

@Cao1224 Cao1224 changed the title Fix issue 701 fix: support pinch-to-zoom and drag-to-pan in lightbox Jun 28, 2026
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.

[Feature request] Image zooming

1 participant