mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
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.
This commit is contained in:
parent
7c2edd232d
commit
04a9562601
Notes:
sideshowbarker
2024-07-17 06:43:12 +09:00
Author: https://github.com/thankyouverycool
Commit: 04a9562601
Pull-request: https://github.com/SerenityOS/serenity/pull/15321
Issue: https://github.com/SerenityOS/serenity/issues/13365
1 changed files with 2 additions and 0 deletions
|
@ -90,6 +90,8 @@ ComboBox::ComboBox()
|
||||||
m_open_button->click();
|
m_open_button->click();
|
||||||
};
|
};
|
||||||
m_editor->on_keypress = [this](KeyEvent& event) {
|
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) {
|
if (!m_list_window->is_visible() && event.key() <= Key_Z && event.key() >= Key_A) {
|
||||||
open();
|
open();
|
||||||
m_list_window->event(event);
|
m_list_window->event(event);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue