mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibGUI: Allow Tab key to switch focus from non-editable GUI::TextEditor
This commit is contained in:
parent
8690f36eb3
commit
8862434376
1 changed files with 3 additions and 2 deletions
|
@ -766,6 +766,9 @@ void TextEditor::select_all()
|
|||
|
||||
void TextEditor::keydown_event(KeyEvent& event)
|
||||
{
|
||||
if (!is_editable() && event.key() == KeyCode::Key_Tab)
|
||||
return AbstractScrollableWidget::keydown_event(event);
|
||||
|
||||
if (m_autocomplete_box && m_autocomplete_box->is_visible() && (event.key() == KeyCode::Key_Return || event.key() == KeyCode::Key_Tab)) {
|
||||
TemporaryChange change { m_should_keep_autocomplete_box, true };
|
||||
if (m_autocomplete_box->apply_suggestion() == CodeComprehension::AutocompleteResultEntry::HideAutocompleteAfterApplying::Yes)
|
||||
|
@ -868,8 +871,6 @@ void TextEditor::keydown_event(KeyEvent& event)
|
|||
}
|
||||
|
||||
if (event.key() == KeyCode::Key_Tab) {
|
||||
if (!is_editable())
|
||||
return;
|
||||
if (has_selection()) {
|
||||
if (event.modifiers() == Mod_Shift) {
|
||||
unindent_selection();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue