diff --git a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp index 0818aa15c..0aaf26335 100644 --- a/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp +++ b/Telegram/SourceFiles/ui/chat/attach/attach_bot_webview.cpp @@ -33,6 +33,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include #include +#include namespace Ui::BotWebView { namespace { @@ -273,7 +274,9 @@ void Panel::Button::setupProgressGeometry() { _progress->widget.show(); _progress->widget.raise(); - if (_progress->shown) { + if (_progress->shown + && Ui::AppInFocus() + && Ui::InFocusChain(_progress->widget.window())) { _progress->widget.setFocus(); } }