提交 46ef5e0a 编写于 作者: D Daniel Imms 提交者: Benjamin Pasero

Fix horizontal scrolling when shift is held (#25320)

* Fix horizontal scrolling when shift is held

Fixes #24710

* Improve comment
上级 3bbf01fe
......@@ -225,7 +225,10 @@ export class ScrollableElement extends Widget {
[deltaY, deltaX] = [deltaX, deltaY];
}
if (this._options.scrollYToX && !deltaX) {
// Convert vertical scrolling to horizontal if shift is held, this
// is handled at a higher level on Mac
const shiftConvert = !Platform.isMacintosh && e.browserEvent.shiftKey;
if ((this._options.scrollYToX || shiftConvert) && !deltaX) {
deltaX = deltaY;
deltaY = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册