Skip to content

[stable35] Fix/noid/no drag cursor without zoom compiled - #3361

Open
backportbot[bot] wants to merge 3 commits into
stable35from
backport/3358/stable35
Open

[stable35] Fix/noid/no drag cursor without zoom compiled#3361
backportbot[bot] wants to merge 3 commits into
stable35from
backport/3358/stable35

Conversation

@backportbot

@backportbot backportbot Bot commented Sep 6, 2026

Copy link
Copy Markdown

Backport of #3358

Warning, This backport's changes differ from the original and might be incomplete 鈿狅笍

Todo

  • Review and resolve any conflicts
  • Review and verify the backported changes
  • Remove all the empty commits
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Follow-up to 6c37fea. Same root cause, two more spots: the component
unconditionally claimed a user input, then bailed out in the handler
after the input was already consumed.

- wheel: @wheel.stop.prevent called preventDefault()/stopPropagation()
  before updateZoom() ever checked canZoom, so the embedded preview
  swallowed page scroll even though it can't zoom. Moved the modifiers
  into updateZoom() itself, after the canZoom guard, so the browser's
  default scroll runs unless zoom is actually enabled.

- touch-action: the img/video rule set touch-action: none
  unconditionally, which blocks swipe-to-scroll on touch devices the
  same way the wheel handler blocked mouse scroll. Scoped it to a new
  &.canZoom class bound to the existing canZoom prop, so it only
  applies where panning/pinch-zoom is actually available.

Also fixed the mixed tabs/spaces left in pointerDown()'s guard from
the previous commit.

Verified canZoom is true only for the active file in the Viewer modal
(src/views/Viewer.vue:145) and false for the embedded/single-file path
(:17) and comparison view (:111), so modal zoom/pan/scroll-lock is
unchanged; only embedded previews (e.g. the Smart Picker file-link
widget in Text) gain back normal page scroll.

Assisted-by: Claude Sonnet 5:claude-sonnet-5

Tested in Talk & Text, viewer and embedded. You can now scroll over
images ;-)

Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
pointerDown() set dragging = true unconditionally, unlike
updateZoom(), pointerMove() and onDblclick() which all early-return
on !canZoom. Combined with the .dragging { cursor: move } style,
this showed a move cursor on embedded previews implying they could
be panned, even though pointerMove() only pans when zoomRatio > 1,
which can never happen while canZoom is false (the Files widget's
setting). This does not enable zoom or panning; it only removes a
false affordance.

Assisted-by: Claude Sonnet 5:claude-sonnet-5

Signed-off-by: Jos Poortvliet <jospoortvliet@gmail.com>
@backportbot backportbot Bot added the 3. to review Waiting for reviews label Sep 6, 2026
@backportbot backportbot Bot added this to the Nextcloud 35 milestone Sep 6, 2026
@susnux

susnux commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

/compile amend

@susnux
susnux marked this pull request as ready for review September 6, 2026 14:45
chore(assets): Recompile assets

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>

Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants