mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
UI/Qt: Do not perform search if query text is empty
This commit is contained in:
parent
d19b31529f
commit
276ad23b70
|
|
@ -31,6 +31,9 @@ LocationEdit::LocationEdit(QWidget* parent)
|
|||
});
|
||||
|
||||
connect(this, &QLineEdit::returnPressed, [&] {
|
||||
if (text().isEmpty())
|
||||
return;
|
||||
|
||||
clearFocus();
|
||||
|
||||
Optional<StringView> search_engine_url;
|
||||
|
|
|
|||
|
|
@ -823,6 +823,8 @@ void Tab::copy_link_url(URL::URL const& url)
|
|||
|
||||
void Tab::location_edit_return_pressed()
|
||||
{
|
||||
if (m_location_edit->text().isEmpty())
|
||||
return;
|
||||
navigate(m_location_edit->url());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user