fix: shift+wheel 横向滚动在云桌面环境下失效#3353
Conversation
云桌面系统已自动将 shift+wheel 转换为横向滚动(deltaX有值, deltaY为0), 但原逻辑依赖 isWindows() UA 判断,会错误地将有效的 deltaX 覆盖为 0。 改为基于实际事件值判断:仅当 deltaY 有值且 deltaX 为 0 时才手动转换, 兼容所有平台和云桌面环境。 Closes: antvis#2198
There was a problem hiding this comment.
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.
云桌面系统已自动将 shift+wheel 转换为横向滚动(deltaX有值, deltaY为0), 但原逻辑依赖 isWindows() UA 判断,会错误地将有效的 deltaX 覆盖为 0。
改为基于实际事件值判断:仅当 deltaY 有值且 deltaX 为 0 时才手动转换,
兼容所有平台和云桌面环境。
👀 PR includes
✨ Feature
🎨 Enhance
🐛 Bugfix
🔧 Chore
📝 Description
🖼️ Screenshot
🔗 Related issue link
🔍 Self-Check before the merge