X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a67dab505adfc6a7a0c08f21d1dd1ead046e044c..95f9dc9de00e4663ade9506bd1b7b58816d13458:/src/search/dolphinsearchbox.cpp diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp index 5d5906b78..c6943c608 100644 --- a/src/search/dolphinsearchbox.cpp +++ b/src/search/dolphinsearchbox.cpp @@ -230,8 +230,13 @@ bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event) { switch (event->type()) { case QEvent::FocusIn: - setActive(true); - setFocus(); + // #379135: we get the FocusIn event when we close a tab but we don't want to emit + // the activated() signal before the removeTab() call in DolphinTabWidget::closeTab() returns. + // To avoid this issue, we delay the activation of the search box. + QTimer::singleShot(0, this, [this] { + setActive(true); + setFocus(); + }); break; default: