diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp index 857803c170..cd2fa4685c 100644 --- a/Telegram/SourceFiles/history/history_inner_widget.cpp +++ b/Telegram/SourceFiles/history/history_inner_widget.cpp @@ -2341,7 +2341,8 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { const auto item = _dragStateItem; const auto itemId = item ? item->fullId() : FullMsgId(); if (isUponSelected > 0) { - if (!hasCopyRestrictionForSelected()) { + if (!hasCopyRestrictionForSelected() + && !getSelectedText().empty()) { _menu->addAction( (isUponSelected > 1 ? tr::lng_context_copy_selected_items(tr::now) @@ -2442,7 +2443,8 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { : QString(); if (isUponSelected > 0) { - if (!hasCopyRestrictionForSelected()) { + if (!hasCopyRestrictionForSelected() + && !getSelectedText().empty()) { _menu->addAction( ((isUponSelected > 1) ? tr::lng_context_copy_selected_items(tr::now) diff --git a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp index 4992cca853..be51f4b50c 100644 --- a/Telegram/SourceFiles/history/view/history_view_context_menu.cpp +++ b/Telegram/SourceFiles/history/view/history_view_context_menu.cpp @@ -995,7 +995,9 @@ base::unique_qptr FillContextMenu( list, st::popupMenuWithIcons); - if (request.overSelection && !list->hasCopyRestrictionForSelected()) { + if (request.overSelection + && !list->hasCopyRestrictionForSelected() + && !list->getSelectedText().empty()) { const auto text = request.selectedItems.empty() ? tr::lng_context_copy_selected(tr::now) : tr::lng_context_copy_selected_items(tr::now);