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.
This commit is contained in:
Tim Ledbetter 2026-06-02 10:20:42 +01:00 committed by Andreas Kling
parent 3e0ae3b5d2
commit 462cd59f58

View file

@ -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();