Browse Source

Issue 2251 – Failure when switching to another application while new session is being opened using New Tab tab

https://winscp.net/tracker/2251

Source commit: 2c00bae1f2e9caed17333766557252c74e04602a
Martin Prikryl 1 year ago
parent
commit
686c7479b9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      source/forms/ScpCommander.cpp

+ 2 - 1
source/forms/ScpCommander.cpp

@@ -3001,8 +3001,9 @@ void TScpCommanderForm::RestoreFocus(void * Focus)
     ControlFocus = NULL;
   }
 
+  // The CanFocus check is hack and should be removed eventually
   if ((ControlFocus != NULL) && DebugAlwaysTrue(ControlFocus->CanFocus()))
   {
-    ControlFocus->SetFocus();
+    ActiveControl = ControlFocus;
   }
 }