From 936537a03a411a597d63076db789d8ab16c3444e Mon Sep 17 00:00:00 2001 From: Mike Sawka Date: Fri, 14 Jun 2024 17:24:36 -0700 Subject: [PATCH] put in some code to fix losing focus on the screen name (#679) --- src/models/screen.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/models/screen.ts b/src/models/screen.ts index 3277224c..9a41ee66 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) {