Properly cancel event when in mouse mode

Fixes #848
This commit is contained in:
Daniel Imms
2017-08-06 12:59:40 -07:00
parent 687a5e2efb
commit 45157d80c6
+2 -1
View File
@@ -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;