Merge remote-tracking branch 'upstream/clearnet' into settings-redesign

pull/2425/head
Audric Ackermann 3 years ago
commit 5ad8c6fa74

@ -2,7 +2,7 @@
"name": "session-desktop", "name": "session-desktop",
"productName": "Session", "productName": "Session",
"description": "Private messaging from your desktop", "description": "Private messaging from your desktop",
"version": "1.9.1", "version": "1.9.2",
"license": "GPL-3.0", "license": "GPL-3.0",
"author": { "author": {
"name": "Oxen Labs", "name": "Oxen Labs",

@ -30,6 +30,7 @@ type Props = {
dataTestId?: string; dataTestId?: string;
enableReactions: boolean; enableReactions: boolean;
}; };
// tslint:disable: use-simple-attributes
const StyledMessageContentContainer = styled.div<{ direction: 'left' | 'right' }>` const StyledMessageContentContainer = styled.div<{ direction: 'left' | 'right' }>`
display: flex; display: flex;
@ -66,18 +67,20 @@ export const MessageContentWithStatuses = (props: Props) => {
const currentSelection = window.getSelection(); const currentSelection = window.getSelection();
const currentSelectionString = currentSelection?.toString() || undefined; const currentSelectionString = currentSelection?.toString() || undefined;
// if multiple word are selected, consider that this double click was actually NOT used to reply to if ((e.target as any).localName !== 'em-emoji-picker') {
// but to select
if ( if (
!currentSelectionString || !currentSelectionString ||
currentSelectionString.length === 0 || currentSelectionString.length === 0 ||
!currentSelectionString.includes(' ') !/\s/.test(currentSelectionString)
) { ) {
// if multiple word are selected, consider that this double click was actually NOT used to reply to
// but to select
void replyToMessage(messageId); void replyToMessage(messageId);
currentSelection?.empty(); currentSelection?.empty();
e.preventDefault(); e.preventDefault();
return; return;
} }
}
}; };
const { messageId, ctxMenuID, isDetailView, dataTestId, enableReactions } = props; const { messageId, ctxMenuID, isDetailView, dataTestId, enableReactions } = props;

Loading…
Cancel
Save