Skip to content

Commit

Permalink
fix: File upload in Safari, IOS devices (RocketChat#27121)
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb authored May 24, 2023
1 parent a49e91c commit c8cdc51
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-masks-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rocket.chat/meteor": patch
---

fix: unable to upload files in IOS Safari browsers
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const FileUploadAction = ({ collapsed, chatContext, disabled, ...props }: FileUp

const handleUpload = () => {
fileInputRef.current?.click();

// Simple hack for iOS aka codegueira
if (navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
fileInputRef.current?.click();
}
};

if (collapsed) {
Expand Down

0 comments on commit c8cdc51

Please sign in to comment.