mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 13:21:37 +01:00
Message Context Menu: Fix width jumps, fix not copying text (#1747)
This commit is contained in:
parent
01002f8eb3
commit
4c33acddf0
@ -28,11 +28,15 @@
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
&--seen-by {
|
||||
min-width: 14rem;
|
||||
}
|
||||
|
||||
.avatars {
|
||||
display: flex;
|
||||
align-self: center;
|
||||
margin-left: auto;
|
||||
padding-left: 1rem;
|
||||
margin-inline-start: auto;
|
||||
padding-inline-start: 1rem;
|
||||
|
||||
.Avatar {
|
||||
border: 0.0625rem solid var(--color-background);
|
||||
|
@ -249,6 +249,7 @@ const MessageContextMenu: FC<OwnProps> = ({
|
||||
{canReport && <MenuItem icon="flag" onClick={onReport}>{lang('lng_context_report_msg')}</MenuItem>}
|
||||
{(canShowSeenBy || canShowReactionsCount) && (
|
||||
<MenuItem
|
||||
className="MessageContextMenu--seen-by"
|
||||
icon={canShowReactionsCount ? 'reactions' : 'group'}
|
||||
onClick={canShowReactionsCount ? onShowReactors : onShowSeenBy}
|
||||
disabled={!canShowReactionsCount && !message.seenByUserIds?.length}
|
||||
|
@ -1,7 +1,8 @@
|
||||
const ELEMENT_NODE = 1;
|
||||
|
||||
export default function getMessageIdsForSelectedText() {
|
||||
let selectedFragments = window.getSelection()?.getRangeAt(0).cloneContents();
|
||||
const selection = window.getSelection();
|
||||
let selectedFragments = selection && selection.rangeCount ? selection.getRangeAt(0).cloneContents() : undefined;
|
||||
if (!selectedFragments || selectedFragments.childElementCount === 0) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user