diff --git a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp index aa86e70942..d342324e44 100644 --- a/Telegram/SourceFiles/ui/widgets/separate_panel.cpp +++ b/Telegram/SourceFiles/ui/widgets/separate_panel.cpp @@ -120,6 +120,13 @@ void SeparatePanel::setHideOnDeactivate(bool hideOnDeactivate) { } void SeparatePanel::showAndActivate() { + if (isHidden()) { + while (const auto widget = QApplication::activePopupWidget()) { + if (!widget->close()) { + break; + } + } + } toggleOpacityAnimation(true); raise(); setWindowState(windowState() | Qt::WindowActive);