Skip to content

Commit

Permalink
Merge pull request #3551 from Tyriar/scroll
Browse files Browse the repository at this point in the history
Allow shift+wheel to bubble up the DOM
  • Loading branch information
Tyriar authored Nov 9, 2021
2 parents cb3dd19 + d54c40a commit 0bc02d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/browser/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }));
Expand Down
4 changes: 2 additions & 2 deletions src/browser/Viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit 0bc02d6

Please sign in to comment.