Skip to content

Commit 0bc02d6

Browse files
authored
Merge pull request #3551 from Tyriar/scroll
Allow shift+wheel to bubble up the DOM
2 parents cb3dd19 + d54c40a commit 0bc02d6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/browser/Terminal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
820820

821821
// normal viewport scrolling
822822
// conditionally stop event, if the viewport still had rows to scroll within
823-
if (!this.viewport!.onWheel(ev)) {
823+
if (this.viewport!.onWheel(ev)) {
824824
return this.cancel(ev);
825825
}
826826
}, { passive: false }));

src/browser/Viewport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class Viewport extends Disposable implements IViewport {
220220

221221
private _getPixelsScrolled(ev: WheelEvent): number {
222222
// Do nothing if it's not a vertical scroll event
223-
if (ev.deltaY === 0) {
223+
if (ev.deltaY === 0 || ev.shiftKey) {
224224
return 0;
225225
}
226226

@@ -241,7 +241,7 @@ export class Viewport extends Disposable implements IViewport {
241241
*/
242242
public getLinesScrolled(ev: WheelEvent): number {
243243
// Do nothing if it's not a vertical scroll event
244-
if (ev.deltaY === 0) {
244+
if (ev.deltaY === 0 || ev.shiftKey) {
245245
return 0;
246246
}
247247

0 commit comments

Comments
 (0)