提交 f479fcd2 编写于 作者: D Daniel Imms

Add null check in terminalPanel click listener

Fixes #27256
上级 9b02670f
......@@ -197,11 +197,12 @@ export class TerminalPanel extends Panel {
this._cancelContextMenu = false;
}));
this._register(dom.addDisposableListener(this._parentDomElement, 'click', (event) => {
if (this._terminalService.terminalInstances.length === 0) {
if (event.which === 3) {
return;
}
if (event.which !== 3) {
const instance = this._terminalService.getActiveInstance();
if (instance) {
this._terminalService.getActiveInstance().focus();
}
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册