fix #127619
This commit is contained in:
parent
2da2d5e5cf
commit
da144f6280
1 changed files with 8 additions and 12 deletions
|
@ -171,20 +171,16 @@ export class TerminalEditor extends EditorPane {
|
|||
}
|
||||
}
|
||||
}));
|
||||
this._register(dom.addDisposableListener(this._parentElement, dom.EventType.CONTEXT_MENU, e => {
|
||||
const rightClickBehavior = this._terminalService.configHelper.config.rightClickBehavior;
|
||||
if (e.button === 2 && rightClickBehavior !== 'copyPaste' && rightClickBehavior !== 'paste') {
|
||||
this._openContextMenu(e);
|
||||
e.preventDefault();
|
||||
}
|
||||
}));
|
||||
this._register(dom.addDisposableListener(this._parentElement, 'contextmenu', (event: MouseEvent) => {
|
||||
const rightClickBehavior = this._terminalService.configHelper.config.rightClickBehavior;
|
||||
if (!this._cancelContextMenu && rightClickBehavior !== 'copyPaste' && rightClickBehavior !== 'paste') {
|
||||
if (!this._cancelContextMenu) {
|
||||
this._openContextMenu(event);
|
||||
}
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
this._cancelContextMenu = false;
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue