mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Merge remote-tracking branch 'upstream/clearnet' into settings-redesign
This commit is contained in:
commit
5ad8c6fa74
2 changed files with 15 additions and 12 deletions
|
@ -2,7 +2,7 @@
|
|||
"name": "session-desktop",
|
||||
"productName": "Session",
|
||||
"description": "Private messaging from your desktop",
|
||||
"version": "1.9.1",
|
||||
"version": "1.9.2",
|
||||
"license": "GPL-3.0",
|
||||
"author": {
|
||||
"name": "Oxen Labs",
|
||||
|
|
|
@ -30,6 +30,7 @@ type Props = {
|
|||
dataTestId?: string;
|
||||
enableReactions: boolean;
|
||||
};
|
||||
// tslint:disable: use-simple-attributes
|
||||
|
||||
const StyledMessageContentContainer = styled.div<{ direction: 'left' | 'right' }>`
|
||||
display: flex;
|
||||
|
@ -66,18 +67,20 @@ export const MessageContentWithStatuses = (props: Props) => {
|
|||
const currentSelection = window.getSelection();
|
||||
const currentSelectionString = currentSelection?.toString() || undefined;
|
||||
|
||||
// if multiple word are selected, consider that this double click was actually NOT used to reply to
|
||||
// but to select
|
||||
if ((e.target as any).localName !== 'em-emoji-picker') {
|
||||
if (
|
||||
!currentSelectionString ||
|
||||
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);
|
||||
currentSelection?.empty();
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const { messageId, ctxMenuID, isDetailView, dataTestId, enableReactions } = props;
|
||||
|
|
Loading…
Reference in a new issue