diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 4255a7e10..e14148752 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -337,6 +337,14 @@ HistoryWidget::HistoryWidget( ) | rpl::start_with_next([=] { fieldChanged(); }, _field->lifetime()); +#ifdef Q_OS_MAC + // Removed an ability to insert text from the menu bar + // when the field is hidden. + _field->shownValue( + ) | rpl::start_with_next([=](bool shown) { + _field->setEnabled(shown); + }, _field->lifetime()); +#endif // Q_OS_MAC connect( controller->widget()->windowHandle(), &QWindow::visibleChanged, diff --git a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp index ac7735953..05675a2fe 100644 --- a/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp +++ b/Telegram/SourceFiles/history/view/controls/history_view_compose_controls.cpp @@ -1558,6 +1558,14 @@ void ComposeControls::initField() { ) | rpl::start_with_next([=] { fieldChanged(); }, _field->lifetime()); +#ifdef Q_OS_MAC + // Removed an ability to insert text from the menu bar + // when the field is hidden. + _field->shownValue( + ) | rpl::start_with_next([=](bool shown) { + _field->setEnabled(shown); + }, _field->lifetime()); +#endif // Q_OS_MAC InitMessageField(_show, _field, [=](not_null emoji) { if (_history && Data::AllowEmojiWithoutPremium(_history->peer)) { return true;