Skip to content

Commit

Permalink
Fix focusing search after database unlock
Browse files Browse the repository at this point in the history
* Fixes #10405
  • Loading branch information
droidmonkey committed Mar 31, 2024
1 parent 32f38cc commit 9521f63
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/gui/DatabaseOpenWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,16 @@ void DatabaseOpenWidget::toggleQuickUnlockScreen()
{
if (canPerformQuickUnlock()) {
m_ui->centralStack->setCurrentIndex(1);
m_ui->quickUnlockButton->setFocus();
// Work around qt issue where focus is stolen even if not visible
if (m_ui->quickUnlockButton->isVisible()) {
m_ui->quickUnlockButton->setFocus();
}
} else {
m_ui->centralStack->setCurrentIndex(0);
m_ui->editPassword->setFocus();
// Work around qt issue where focus is stolen even if not visible
if (m_ui->editPassword->isVisible()) {
m_ui->editPassword->setFocus();
}
}
}

Expand Down

0 comments on commit 9521f63

Please sign in to comment.