mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Focus locationbar on startup if url of current tab is empty
This commit is contained in:
parent
6c30379077
commit
06b2414d80
|
@ -226,7 +226,16 @@ void BrowserWindow::postLaunch()
|
|||
raise();
|
||||
activateWindow();
|
||||
|
||||
QTimer::singleShot(0, tabWidget()->tabBar(), SLOT(ensureVisible()));
|
||||
QTimer::singleShot(0, this, [this]() {
|
||||
// Scroll to current tab
|
||||
tabWidget()->tabBar()->ensureVisible();
|
||||
|
||||
// Update focus
|
||||
if (locationBar()->text().isEmpty())
|
||||
locationBar()->setFocus();
|
||||
else
|
||||
weView()->setFocus();
|
||||
});
|
||||
}
|
||||
|
||||
void BrowserWindow::setupUi()
|
||||
|
|
Loading…
Reference in New Issue
Block a user