Reply to a message by double clicking on its row

This commit is contained in:
Hugo Osvaldo Barrera 2021-01-11 22:43:58 +01:00 committed by Josh Perez
parent d4124abb01
commit 288293795f
2 changed files with 84 additions and 48 deletions

View file

@ -1745,6 +1745,11 @@ export class Message extends React.PureComponent<Props, State> {
: null
)}
dir={isRTL ? 'rtl' : undefined}
onDoubleClick={(event: React.MouseEvent) => {
// Prevent double-click interefering with interactions _inside_
// the bubble.
event.stopPropagation();
}}
>
<MessageBodyReadMore
bodyRanges={bodyRanges}
@ -2505,6 +2510,10 @@ export class Message extends React.PureComponent<Props, State> {
role="row"
onKeyDown={onKeyDown}
onClick={this.handleClick}
onDoubleClick={ev => {
// Prevent double click from triggering the replyToMessage action
ev.stopPropagation();
}}
tabIndex={-1}
>
{this.renderAuthor()}