Message.tsx: Don't let event propagate on generic attachment click

This commit is contained in:
Scott Nonnenberg 2022-09-08 15:09:40 -07:00 committed by GitHub
parent 34f2ce06c6
commit 9d50679473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1085,7 +1085,10 @@ export class Message extends React.PureComponent<Props, State> {
)}
// There's only ever one of these, so we don't want users to tab into it
tabIndex={-1}
onClick={() => {
onClick={event => {
event.stopPropagation();
event.preventDefault();
if (!isDownloaded(firstAttachment)) {
kickOffAttachmentDownload({
attachment: firstAttachment,