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

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,