Skip to content

Commit

Permalink
Merge pull request #13448 from 0xmiroslav/issue-13435
Browse files Browse the repository at this point in the history
fix "Upload photo" popup menu not hiding
  • Loading branch information
marcaaron authored Dec 9, 2022
2 parents 216bbe9 + fee05c8 commit 5948a0a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/AttachmentPicker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class AttachmentPicker extends React.Component {
// Cleanup after selecting a file to start from a fresh state
this.fileInput.value = null;
}}

// We are stopping the event propagation because triggering the `click()` on the hidden input
// causes the event to unexpectedly bubble up to anything wrapping this component e.g. Pressable
onClick={e => e.stopPropagation()}
accept={getAcceptableFileTypes(this.props.type)}
/>
{this.props.children({
Expand Down

0 comments on commit 5948a0a

Please sign in to comment.