diff --git a/Telegram/SourceFiles/ui/chat/forward_options_box.cpp b/Telegram/SourceFiles/ui/chat/forward_options_box.cpp index c619ee719..760ab5dad 100644 --- a/Telegram/SourceFiles/ui/chat/forward_options_box.cpp +++ b/Telegram/SourceFiles/ui/chat/forward_options_box.cpp @@ -82,6 +82,17 @@ void ForwardOptionsBox( box->addButton(tr::lng_box_done(), [=] { box->closeBox(); }); + + box->events( + ) | rpl::start_with_next([=](not_null e) { + if (e->type() == QEvent::KeyPress) { + const auto k = static_cast(e.get()); + if (k->key() == Qt::Key_Enter || k->key() == Qt::Key_Return) { + box->closeBox(); + } + } + }, box->lifetime()); + box->addRow( object_ptr( box.get(),