diff --git a/src/gui/DatabaseWidget.cpp b/src/gui/DatabaseWidget.cpp index eb33c09c..990cf4e3 100644 --- a/src/gui/DatabaseWidget.cpp +++ b/src/gui/DatabaseWidget.cpp @@ -1646,6 +1646,8 @@ bool DatabaseWidget::save() m_blockAutoSave = true; ++m_saveAttempts; + auto focusWidget = qApp->focusWidget(); + // TODO: Make this async // Lock out interactions m_entryView->setDisabled(true); @@ -1660,6 +1662,10 @@ bool DatabaseWidget::save() m_entryView->setDisabled(false); m_groupView->setDisabled(false); + if (focusWidget) { + focusWidget->setFocus(); + } + if (ok) { m_saveAttempts = 0; m_blockAutoSave = false;