Message.tsx: Don't handle clicks outside of container

This commit is contained in:
Scott Nonnenberg 2022-04-25 10:26:45 -07:00 committed by GitHub
parent d8708e4e73
commit 5e0534310e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -2668,6 +2668,10 @@ export class Message extends React.PureComponent<Props, State> {
className={containerClassnames}
style={containerStyles}
onContextMenu={this.showContextMenu}
role="row"
onKeyDown={this.handleKeyDown}
onClick={this.handleClick}
tabIndex={-1}
>
{this.renderAuthor()}
{this.renderContents()}
@ -2717,7 +2721,6 @@ export class Message extends React.PureComponent<Props, State> {
// cannot be within another button
role="button"
onKeyDown={this.handleKeyDown}
onClick={this.handleClick}
onFocus={this.handleFocus}
ref={this.focusRef}
>