From 462cd59f589cb91f060f8641e0ca3355f4104ca1 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Tue, 2 Jun 2026 10:20:42 +0100 Subject: [PATCH] UI/Qt: Keep location bar selection when right-click context menu opens Previously, selecting all or part of the URL in the location bar, then right clicking it would cause the URL to become deselected. --- UI/Qt/LocationEdit.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UI/Qt/LocationEdit.cpp b/UI/Qt/LocationEdit.cpp index b8a3c1de84..0cf35ef373 100644 --- a/UI/Qt/LocationEdit.cpp +++ b/UI/Qt/LocationEdit.cpp @@ -417,6 +417,10 @@ void LocationEdit::focusInEvent(QFocusEvent* event) void LocationEdit::focusOutEvent(QFocusEvent* event) { QLineEdit::focusOutEvent(event); + + if (event->reason() == Qt::PopupFocusReason) + return; + animate_focus_glow(0); reset_autocomplete_state();