diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 740a0e3a2..62a372048 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1597,6 +1597,12 @@ void HistoryWidget::fieldChanged() { updateSendButtonType(); if (!HasSendText(_field)) { _previewState = Data::PreviewState::Allowed; + _fieldIsEmpty = true; + } else if (_fieldIsEmpty) { + _fieldIsEmpty = false; + if (_kbShown) { + toggleKeyboard(); + } } if (updateCmdStartShown()) { updateControlsVisibility(); diff --git a/Telegram/SourceFiles/history/history_widget.h b/Telegram/SourceFiles/history/history_widget.h index 983a61305..6b1f0844c 100644 --- a/Telegram/SourceFiles/history/history_widget.h +++ b/Telegram/SourceFiles/history/history_widget.h @@ -743,6 +743,7 @@ private: bool _inClickable = false; bool _kbShown = false; + bool _fieldIsEmpty = true; HistoryItem *_kbReplyTo = nullptr; object_ptr _kbScroll; const not_null _keyboard;