tabWidgetPointer->currentWidget()->setFocus();
}
-PrivacyWebEngineView* TabWidget::addTab()
+PrivacyWebEngineView* TabWidget::addTab(const bool focusNewWebEngineView)
{
// Create a privacy WebEngine view.
PrivacyWebEngineView *privacyWebEngineViewPointer = new PrivacyWebEngineView();
// Move to the new tab.
tabWidgetPointer->setCurrentIndex(newTabIndex);
+ // Clear the URL line edit focus so that it populates correctly when opening a new tab from the context menu.
+ if (focusNewWebEngineView)
+ emit clearUrlLineEditFocus();
+
// Return the privacy WebEngine view pointer.
return privacyWebEngineViewPointer;
}