Skip to content

feat(whiteboard): mouse wheel scrolls instead of zooming (use ctrl to zoom) - #25527

Merged
ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
latifurrehman-56:feat/v4-tldraw-wheel-behavior
Aug 26, 2026
Merged

ramonlsouza merged 1 commit into
bigbluebutton:v4.0.x-developfrom
latifurrehman-56:feat/v4-tldraw-wheel-behavior

Conversation

@latifurrehman-56

Copy link
Copy Markdown

This pull request modifies the tldraw mouse wheel behavior in the presentation area.

Features added:

  • Scroll to Pan: By default, scrolling the mouse wheel now pans the presentation vertically, allowing users to easily navigate up and down without accidentally changing the zoom level.
  • Ctrl + Scroll to Zoom: Holding the \Ctrl\ (or \Cmd\ on Mac) key while scrolling the mouse wheel now zooms the presentation in and out.

Benefits:
This provides a more consistent, intuitive, and standard navigation experience (similar to most document viewers and map applications) and prevents accidental zooming when a user simply intends to scroll the page.

Modifies the tldraw mouse wheel behavior so scrolling the wheel pans the presentation, and holding ctrl (or cmd) while scrolling zooms in/out. This provides a more consistent and intuitive navigation experience for users.
@github-actions

Copy link
Copy Markdown

Thank you for this contribution!
Could you please confirm if you already sent in the signed Contributor License Agreement?
See https://docs.bigbluebutton.org/support/faq.html#why-do-i-need-to-sign-a-contributor-license-agreement-to-contribute-source-code
Thanks in advance!

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Whiteboard wheel handling now supports two modes: Ctrl/Cmd-modified wheel movement adjusts cursor-anchored zoom and backend zoom percentage, while unmodified wheel movement vertically pans the camera using the current zoom factor without changing zoom.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: wheel scrolling pans by default and uses Ctrl/Cmd to zoom.
Description check ✅ Passed The description accurately describes the scroll-to-pan and modifier-key zoom behavior in the whiteboard area.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@latifurrehman-56

Copy link
Copy Markdown
Author

I have already signed and emailed the Contributor License Agreement for my previous PR.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bigbluebutton-html5/imports/ui/components/whiteboard/hooks.js`:
- Around line 228-229: Update the zoom modifier check in the wheel-event handler
around event.ctrlKey and event.metaKey to use only the platform-appropriate key:
metaKey on macOS and ctrlKey on Windows/Linux. Ensure the non-platform modifier
is ignored so accidental zooming cannot occur.
- Around line 261-265: Update the vertical pan calculation in the wheel-handling
hook by removing the negation from the deltaY-based panAmount expression.
Preserve the existing panFactor and cz scaling so positive deltaY increases cy
and moves the presentation downward.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9e9e12f7-7dcc-49ab-880f-0efda66d2705

📥 Commits

Reviewing files that changed from the base of the PR and between ac4896c and 98779d8.

📒 Files selected for processing (1)
  • bigbluebutton-html5/imports/ui/components/whiteboard/hooks.js

Comment on lines +228 to +229
// Check if user wants to zoom (Ctrl/Cmd key pressed)
if (event.ctrlKey || event.metaKey) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the platform-specific zoom modifier.

This allows Ctrl+wheel on macOS and Meta+wheel on Windows/Linux, contrary to the stated Cmd-on-macOS / Ctrl-elsewhere behavior. Ctrl+wheel on macOS can therefore still trigger accidental zooming.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bigbluebutton-html5/imports/ui/components/whiteboard/hooks.js` around lines
228 - 229, Update the zoom modifier check in the wheel-event handler around
event.ctrlKey and event.metaKey to use only the platform-appropriate key:
metaKey on macOS and ctrlKey on Windows/Linux. Ensure the non-platform modifier
is ignored so accidental zooming cannot occur.

Comment on lines +261 to +265
const panAmount = -(event.deltaY * panFactor) / cz;

const nextCamera = {
x: cx,
y: cy + panAmount,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix the inverted vertical pan direction.

For a positive deltaY (scroll down), negating panAmount decreases cy, moving the viewport upward. Remove the negation so normal scrolling moves the presentation downward.

Proposed fix
-      const panAmount = -(event.deltaY * panFactor) / cz;
+      const panAmount = (event.deltaY * panFactor) / cz;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const panAmount = -(event.deltaY * panFactor) / cz;
const nextCamera = {
x: cx,
y: cy + panAmount,
const panAmount = (event.deltaY * panFactor) / cz;
const nextCamera = {
x: cx,
y: cy + panAmount,
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@bigbluebutton-html5/imports/ui/components/whiteboard/hooks.js` around lines
261 - 265, Update the vertical pan calculation in the wheel-handling hook by
removing the negation from the deltaY-based panAmount expression. Preserve the
existing panFactor and cz scaling so positive deltaY increases cy and moves the
presentation downward.

@antobinary antobinary added this to the Release 4.0 milestone Jul 27, 2026
@ramonlsouza
ramonlsouza self-requested a review August 6, 2026 11:32
@ramonlsouza
ramonlsouza merged commit 74600e3 into bigbluebutton:v4.0.x-develop Aug 26, 2026
4 checks passed
ramonlsouza pushed a commit that referenced this pull request Sep 3, 2026
BBB 4.0 changed the presenter mouse wheel over the presentation from
zooming to vertical scrolling, with Ctrl/Cmd + wheel to zoom (#25527).
Deployments whose users rely on the long-standing zoom-by-wheel
navigation (unchanged for many years before 4.0) asked for a way to
keep it, especially where portrait slides that benefit from scrolling
are rare.

Add public.whiteboard.wheelZoomRequiresCtrl:
- true (default): wheel scrolls the slide, Ctrl/Cmd + wheel zooms
  (the 4.0 behavior, unchanged)
- false: wheel zooms directly, as in BBB 3.0 and earlier

The fallback to true in hooks.js covers clients briefly served a
settings payload predating this key during rolling upgrades.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants