Skip to content

[stable-0.1] fix(editor): wheel scrolling and zoom in Firefox, Shift+wheel and small zoom steps - #403

Merged
AndyScherzinger merged 2 commits into
stable-0.1from
backport/firefox-wheel-stable-0.1
Oct 19, 2026
Merged

AndyScherzinger merged 2 commits into
stable-0.1from
backport/firefox-wheel-stable-0.1

Conversation

@AndyScherzinger

@AndyScherzinger AndyScherzinger commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Backport of #402 to stable-0.1. Fixes #93 for Nextcloud 32–35.

  • Firefox: the mouse wheel did nothing on the mind map canvas: no vertical or horizontal scrolling, and no Ctrl+wheel zoom. kity only listens for mousewheel when elements have an onmousewheel property, and Firefox has neither that property nor the event. The editor iframe's script now provides both, re-dispatching standard wheel events with Chrome's deltas.
  • Shift+wheel: now scrolls the canvas horizontally in all browsers.
  • Ctrl/Cmd+wheel: now zooms on touchpad pinches and small steps too, once per gesture.

Both commits cherry-picked without changes. Tested on Nextcloud 32 and 35 in Chromium and Firefox, with the same results as in #402:

  • Wheel scrolling moves the canvas vertically and horizontally.
  • Shift+wheel scrolls horizontally.
  • Ctrl+wheel and Cmd+wheel zoom 100 → 120 → 100 %, also on small steps.
  • A burst of small Ctrl steps zooms once.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

The editor pans on the non-standard mousewheel event and zooms on it with
Ctrl, but kity only listens for an event that elements have an on<type>
property for, and Firefox has neither onmousewheel nor fires mousewheel.
So wheel scrolling and Ctrl+wheel zoom did nothing in Firefox. Where
mousewheel is missing, give elements the property and re-dispatch each
wheel event as mousewheel with the deltas Chrome reports.

Fixes #93

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
(cherry picked from commit 4b6c259)
@AndyScherzinger AndyScherzinger added this to the v0.1.4 milestone Oct 19, 2026
@AndyScherzinger AndyScherzinger added enhancement New feature or request AI assisted This PR contains AI-assisted commits labels Oct 19, 2026
…l steps

The editor ignored the wheel while Shift was held, and zoomed with Ctrl or
Cmd only once a single event reported more than 100, which touchpad
pinches and the small pixel steps of macOS never do. Re-dispatch the
wheel as mousewheel in Chrome too where needed: with Shift as horizontal
scrolling, and with Ctrl or Cmd with at least 120. The editor still zooms
once per gesture, as it waits for 100 ms of quiet.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
(cherry picked from commit cb780ce)
@AndyScherzinger AndyScherzinger changed the title [stable-0.1] fix(editor): scroll and zoom the mind map with the wheel in Firefox [stable-0.1] fix(editor): wheel scrolling and zoom in Firefox, Shift+wheel and small zoom steps Oct 19, 2026
@AndyScherzinger
AndyScherzinger merged commit 242dc20 into stable-0.1 Oct 19, 2026
7 checks passed
@AndyScherzinger
AndyScherzinger deleted the backport/firefox-wheel-stable-0.1 branch October 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assisted This PR contains AI-assisted commits enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant