diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index 22805a177a..aa7fe0bc53 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -145,6 +146,11 @@ Tab::Tab(BrowserWindow& window, Type type) m_location_box->set_placeholder("Address"); m_location_box->on_return_pressed = [this] { + if (m_location_box->text().starts_with('?') && g_search_engine.is_empty()) { + GUI::MessageBox::show(&this->window(), "Select a search engine in the Settings menu before searching.", "No search engine selected", GUI::MessageBox::Type::Information); + return; + } + auto url = url_from_user_input(m_location_box->text()); load(url); view().set_focus(true);