Merge pull request #849 from Tyriar/848_cancel_event_on_wheel
Properly cancel event when in mouse mode
This commit is contained in:
+2
-1
@@ -1086,7 +1086,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
if (!this.mouseEvents) return;
|
if (!this.mouseEvents) return;
|
||||||
if (this.x10Mouse || this.vt300Mouse || this.decLocator) return;
|
if (this.x10Mouse || this.vt300Mouse || this.decLocator) return;
|
||||||
sendButton(ev);
|
sendButton(ev);
|
||||||
return this.cancel(ev);
|
ev.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
// allow wheel scrolling in
|
// allow wheel scrolling in
|
||||||
@@ -2221,6 +2221,7 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
|||||||
this.buffer.tabs[this.buffer.x] = true;
|
this.buffer.tabs[this.buffer.x] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Remove cancel function and cancelEvents option
|
||||||
public cancel(ev: Event, force?: boolean): boolean {
|
public cancel(ev: Event, force?: boolean): boolean {
|
||||||
if (!this.options.cancelEvents && !force) {
|
if (!this.options.cancelEvents && !force) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user