diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -27,9 +27,11 @@ #include #include #include +#include #include #include +#include DolphinTabWidget::DolphinTabWidget(QWidget* parent) : QTabWidget(parent), @@ -139,9 +141,14 @@ navigator->setUrlEditable(isUrlEditable); if (isUrlEditable) { - // If a new tab is opened and the URL is editable, assure that - // the user can edit the URL without manually setting the focus - navigator->setFocus(); + // If a new tab is opened and the URL is editable, select everything + // So the user can quickly enter new text without having to manually + // delete anything + navigator->editor()->lineEdit()->selectAll(); + } else { + // Otherwise, give the view keyboard focus, since that's more useful + // than making the breadcrumbs bar have focus + currentTabPage()->activeViewContainer()->view()->setFocus(); } }