From 45157d80c66bdf75c2c79ad8ec81929134e797ee Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 6 Aug 2017 12:59:40 -0700 Subject: [PATCH] Properly cancel event when in mouse mode Fixes #848 --- src/Terminal.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Terminal.ts b/src/Terminal.ts index cd44e7fb76..b6a9d10483 100644 --- a/src/Terminal.ts +++ b/src/Terminal.ts @@ -1100,7 +1100,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT if (!this.mouseEvents) return; if (this.x10Mouse || this.vt300Mouse || this.decLocator) return; sendButton(ev); - return this.cancel(ev); + ev.preventDefault(); }); // allow wheel scrolling in @@ -2247,6 +2247,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT this.buffer.tabs[this.buffer.x] = true; } + // TODO: Remove cancel function and cancelEvents option public cancel(ev: Event, force?: boolean): boolean { if (!this.options.cancelEvents && !force) { return;