|
|
@ -1116,11 +1116,19 @@ export class Message extends React.PureComponent<Props, State> {
|
|
|
|
expiring ? 'module-message--expired' : null
|
|
|
|
expiring ? 'module-message--expired' : null
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
role="button"
|
|
|
|
role="button"
|
|
|
|
onClick={() => {
|
|
|
|
onClick={event => {
|
|
|
|
const selection = window.getSelection();
|
|
|
|
const selection = window.getSelection();
|
|
|
|
|
|
|
|
// Text is being selected
|
|
|
|
if (selection && selection.type === 'Range') {
|
|
|
|
if (selection && selection.type === 'Range') {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// User clicked on message body
|
|
|
|
|
|
|
|
const target = event.target as HTMLDivElement;
|
|
|
|
|
|
|
|
if (target.className === 'text-selectable') {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.props.onSelectMessage();
|
|
|
|
this.props.onSelectMessage();
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
>
|
|
|
|