mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
UI/Qt: Do not perform search if query text is empty
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user