diff --git a/src/lib/navigation/completer/locationcompleter.cpp b/src/lib/navigation/completer/locationcompleter.cpp index 9098fb590..53ddb5060 100644 --- a/src/lib/navigation/completer/locationcompleter.cpp +++ b/src/lib/navigation/completer/locationcompleter.cpp @@ -204,6 +204,11 @@ void LocationCompleter::indexActivated(const QModelIndex &index) { Q_ASSERT(index.isValid()); + closePopup(); + + // Clear locationbar + emit clearCompletion(); + bool ok; const int tabPos = index.data(LocationCompleterModel::TabPositionTabRole).toInt(&ok); @@ -321,11 +326,6 @@ void LocationCompleter::switchToTab(BrowserWindow* window, int tab) Q_ASSERT(window); Q_ASSERT(tab >= 0); - closePopup(); - - // Clear locationbar - emit clearCompletion(); - TabWidget* tabWidget = window->tabWidget(); if (window->isActiveWindow() || tabWidget->currentIndex() != tab) {