diff --git a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp index aa554e19c0..f1e0e176ee 100644 --- a/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp +++ b/Telegram/SourceFiles/chat_helpers/emoji_suggestions_widget.cpp @@ -526,14 +526,14 @@ SuggestionsController::SuggestionsController( setReplaceCallback(nullptr); const auto fieldCallback = [=](not_null event) { - return fieldFilter(event) + return (_container && fieldFilter(event)) ? base::EventFilterResult::Cancel : base::EventFilterResult::Continue; }; _fieldFilter.reset(base::install_event_filter(_field, fieldCallback)); const auto outerCallback = [=](not_null event) { - return outerFilter(event) + return (_container && outerFilter(event)) ? base::EventFilterResult::Cancel : base::EventFilterResult::Continue; };