Skip to content

Commit 04a9562

Browse files
thankyouverycoolawesomekling
authored andcommitted
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.
1 parent 7c2edd2 commit 04a9562

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Userland/Libraries/LibGUI/ComboBox.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ ComboBox::ComboBox()
9090
m_open_button->click();
9191
};
9292
m_editor->on_keypress = [this](KeyEvent& event) {
93+
if (!m_only_allow_values_from_model)
94+
return;
9395
if (!m_list_window->is_visible() && event.key() <= Key_Z && event.key() >= Key_A) {
9496
open();
9597
m_list_window->event(event);

0 commit comments

Comments
 (0)