Merge pull request #3551 from Tyriar/scroll

Allow shift+wheel to bubble up the DOM
This commit is contained in:
Daniel Imms
2021-11-09 06:54:22 -08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -820,7 +820,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
// normal viewport scrolling
// conditionally stop event, if the viewport still had rows to scroll within
if (!this.viewport!.onWheel(ev)) {
if (this.viewport!.onWheel(ev)) {
return this.cancel(ev);
}
}, { passive: false }));
+2 -2
View File
@@ -220,7 +220,7 @@ export class Viewport extends Disposable implements IViewport {
private _getPixelsScrolled(ev: WheelEvent): number {
// Do nothing if it's not a vertical scroll event
if (ev.deltaY === 0) {
if (ev.deltaY === 0 || ev.shiftKey) {
return 0;
}
@@ -241,7 +241,7 @@ export class Viewport extends Disposable implements IViewport {
*/
public getLinesScrolled(ev: WheelEvent): number {
// Do nothing if it's not a vertical scroll event
if (ev.deltaY === 0) {
if (ev.deltaY === 0 || ev.shiftKey) {
return 0;
}