mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-29 08:11:13 +00:00
UI/Qt: Don't change LocationEdit cursor position on right click
Previously, right clicking highlighted text in the location bar would cause the current selection to be lost.
This commit is contained in:
parent
dc18280f80
commit
6c608bac65
Notes:
github-actions[bot]
2024-09-10 05:41:19 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/6c608bac659 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1351
|
@ -73,9 +73,12 @@ void LocationEdit::focusOutEvent(QFocusEvent* event)
|
||||||
if (text().isEmpty())
|
if (text().isEmpty())
|
||||||
setText(qstring_from_ak_string(m_url.serialize()));
|
setText(qstring_from_ak_string(m_url.serialize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->reason() != Qt::PopupFocusReason) {
|
||||||
setCursorPosition(0);
|
setCursorPosition(0);
|
||||||
highlight_location();
|
highlight_location();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LocationEdit::update_placeholder()
|
void LocationEdit::update_placeholder()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue