From 2ba162405e5dc2076ae03a0a759b3e94ced1b26d Mon Sep 17 00:00:00 2001 From: BDisp Date: Mon, 22 Apr 2024 00:00:54 +0100 Subject: [PATCH] Fixes #3424. v1 - Views should not force focus if they are not selected. --- Terminal.Gui/Views/ComboBox.cs | 2 +- Terminal.Gui/Windows/Wizard.cs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/ComboBox.cs b/Terminal.Gui/Views/ComboBox.cs index 0483d82e7..7e5177142 100644 --- a/Terminal.Gui/Views/ComboBox.cs +++ b/Terminal.Gui/Views/ComboBox.cs @@ -792,7 +792,7 @@ namespace Terminal.Gui { listview.SetSource (searchset); listview.Height = CalculatetHeight (); - if (Subviews.Count > 0) { + if (HasFocus && Subviews.Count > 0) { search.SetFocus (); } } diff --git a/Terminal.Gui/Windows/Wizard.cs b/Terminal.Gui/Windows/Wizard.cs index d63ae274d..c1d326281 100644 --- a/Terminal.Gui/Windows/Wizard.cs +++ b/Terminal.Gui/Windows/Wizard.cs @@ -773,6 +773,10 @@ namespace Terminal.Gui { var oldStep = currentStep; currentStep = newStep; + if (currentStep is null) { + return false; + } + UpdateButtonsAndTitle (); // Set focus to the nav buttons