From b6fd348c6f727a4a16021ac2b9e3c2859b3f7e60 Mon Sep 17 00:00:00 2001 From: Martin Zikmund Date: Fri, 27 Sep 2024 10:12:06 +0200 Subject: [PATCH] fix: Uno specific workaround for invalid assert in ComboBox --- src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs index 2fce01fdb02b..d96f0cfd1a32 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ComboBox/ComboBox.partial.mux.cs @@ -2447,7 +2447,9 @@ private void OnCharacterReceived(UIElement pSender, CharacterReceivedRoutedEvent char keyCode; keyCode = pArgs.Character; - if (!IsEditable) + // Uno specific: In WinUI this condition is only !IsEditable - however this seems to be wrong + // as the KeyDown handling also considers IsInSearchingMode. + if (!IsEditable && !IsInSearchingMode()) { // Space should have been handled by now because we handle the Space key in the KeyDown event handler. // NOTE: The 2 below specifies the map type, and maps VK to CHAR