Skip to content

Commit

Permalink
Properly cancel event when in mouse mode
Browse files Browse the repository at this point in the history
Fixes #848
  • Loading branch information
Tyriar committed Aug 6, 2017
1 parent 687a5e2 commit 45157d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 45157d8

Please sign in to comment.