Skip to content

fix: shift+wheel 横向滚动在云桌面环境下失效#3353

Merged
Alexzjt merged 1 commit into
antvis:1.x-stablefrom
LUUUAN:fix/shift-wheel-scroll-cloud-desktop-pr
Jun 11, 2026
Merged

fix: shift+wheel 横向滚动在云桌面环境下失效#3353
Alexzjt merged 1 commit into
antvis:1.x-stablefrom
LUUUAN:fix/shift-wheel-scroll-cloud-desktop-pr

Conversation

@LUUUAN

@LUUUAN LUUUAN commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

云桌面系统已自动将 shift+wheel 转换为横向滚动(deltaX有值, deltaY为0), 但原逻辑依赖 isWindows() UA 判断,会错误地将有效的 deltaX 覆盖为 0。

改为基于实际事件值判断:仅当 deltaY 有值且 deltaX 为 0 时才手动转换,
兼容所有平台和云桌面环境。

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

🐛 Bugfix

  • Solve the issue and close

🔧 Chore

  • Test case
  • Docs / demos update
  • CI / workflow
  • Release version
  • Other ()

📝 Description

🖼️ Screenshot

Before After

⚠️ Breaking Changes

  • Yes
  • No

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

云桌面系统已自动将 shift+wheel 转换为横向滚动(deltaX有值, deltaY为0),
但原逻辑依赖 isWindows() UA 判断,会错误地将有效的 deltaX 覆盖为 0。

改为基于实际事件值判断:仅当 deltaY 有值且 deltaX 为 0 时才手动转换,
兼容所有平台和云桌面环境。

Closes: antvis#2198

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request refactors the horizontal scroll handling when the shift key is held down. Instead of relying on an OS-specific check (isWindows()), the code now detects whether the system has already converted the scroll direction by checking if deltaY is not zero and deltaX is zero. This improves compatibility with cloud desktops and macOS environments. The corresponding unit tests have been updated to reflect this behavior-based detection. There are no review comments to address.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@Alexzjt
Alexzjt merged commit 1f1f7d4 into antvis:1.x-stable Jun 11, 2026
5 of 9 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.

2 participants