diff --git a/src/models/screen.ts b/src/models/screen.ts index 3277224cb..9a41ee66a 100644 --- a/src/models/screen.ts +++ b/src/models/screen.ts @@ -234,10 +234,21 @@ class Screen { } refocusLine(sdata: ScreenDataType, oldFocusType: string, oldSelectedLine: number): void { + if (this.globalModel.activeMainView.get() != "session") { + return; + } let isCmdFocus = sdata.focustype == "cmd"; if (!isCmdFocus) { return; } + if (document.activeElement != null) { + if (document.activeElement.nodeName == "INPUT" || document.activeElement.nodeName == "TEXTAREA") { + return; + } + } + if (this.globalModel.modalsModel.hasOpenModals()) { + return; + } let curLineFocus = this.globalModel.getFocusedLine(); let sline: LineType = null; if (sdata.selectedline != 0) {