From 04a9562601a25644764c6b6b4247738f2d0dbfab Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Wed, 21 Sep 2022 07:19:50 -0400 Subject: [PATCH] LibGUI: Don't open windows for editable ComboBoxes when typing Fixes inability to type custom values into ComboBox editors. CaptureInput preempts typing while the ListView window is open. For now, searching can still be done by manually opening the window. --- Userland/Libraries/LibGUI/ComboBox.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibGUI/ComboBox.cpp b/Userland/Libraries/LibGUI/ComboBox.cpp index 3ce822676b9..b5aca120572 100644 --- a/Userland/Libraries/LibGUI/ComboBox.cpp +++ b/Userland/Libraries/LibGUI/ComboBox.cpp @@ -90,6 +90,8 @@ ComboBox::ComboBox() m_open_button->click(); }; m_editor->on_keypress = [this](KeyEvent& event) { + if (!m_only_allow_values_from_model) + return; if (!m_list_window->is_visible() && event.key() <= Key_Z && event.key() >= Key_A) { open(); m_list_window->event(event);