UI/Qt: Submit autocomplete selections directly

When Return is pressed while the autocomplete popup is visible, submit
the location edit directly instead of falling through to QLineEdit's
default key handling after closing the popup. This keeps the omnibox
responsive to Return after chrome layout changes rebuild nearby widgets.
This commit is contained in:
Andreas Kling 2026-06-03 01:01:27 +02:00 committed by Andreas Kling
parent 60847b9937
commit 51c9ffc8d8

View file

@ -487,6 +487,9 @@ void LocationEdit::keyPressEvent(QKeyEvent* event)
m_is_applying_inline_autocomplete = false;
}
m_autocomplete->close();
emit returnPressed();
event->accept();
return;
}
if (should_suppress_inline_autocomplete_for_key(event))