Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/react/src/components/Attachment/Attachment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ class Attachment extends UIComponent<WithAsProp<AttachmentProps>, AttachmentStat
}

performClick = e => {
e.stopPropagation()
this.handleClick(e)
if (e.currentTarget === e.target) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

based on agreement with @layershifter and @miroslavstastny this is ok for now, but it shows a bigger issue we have related to click handling of components that have parent/child clickable elements, especially if the elements trigger click on keyboard events (button, a)

This might help move the logic to behaviors: #1502

e.stopPropagation()
this.handleClick(e)
}
}

handleClick = (e: React.SyntheticEvent) => {
Expand Down