The "Replace Location" action moves focus to the location bar and
selects the full path there so it can easily be replaced with a
different path.
When the full path is already selected, triggering "Replace
Location" will toggle the editable state of the location bar.
This commit makes it, that this also moves the focus to the view.
This way, pressing Ctrl+L multiple times will switch back and forth
between focusing and selecting the location bar path and focusing
the view. This seems more sensible than only partially resetting
the state when the "Replace Location" keyboard shortcut is pressed
twice.
// If the text field currently has focus and everything is selected,
// pressing the keyboard shortcut returns the whole thing to breadcrumb mode
+ // and goes back to the view, just like how it was before this action was triggered the first time.
if (navigator->isUrlEditable() && lineEdit->hasFocus() && lineEdit->selectedText() == lineEdit->text()) {
navigator->setUrlEditable(false);
+ m_activeViewContainer->view()->setFocus();
} else {
navigator->setUrlEditable(true);
navigator->setFocus();