From 51c9ffc8d80bdfa8c8273639e9bcfc937d350ad0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 3 Jun 2026 01:01:27 +0200 Subject: [PATCH] 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. --- UI/Qt/LocationEdit.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UI/Qt/LocationEdit.cpp b/UI/Qt/LocationEdit.cpp index 48d7d10501..b8a3c1de84 100644 --- a/UI/Qt/LocationEdit.cpp +++ b/UI/Qt/LocationEdit.cpp @@ -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))