Skip to content

Commit 6a74334

Browse files
committed
Add note about iOS
Hopefully this might help others not run into the same issue of executing outside of a user interaction event loop.
1 parent 765f1d9 commit 6a74334

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ See [ChenWenBrian's `saveTextAs()`](https://github.com/ChenWenBrian/FileSaver.js
4545
Blobs may be opened instead of saved sometimes—you may have to direct your Safari users to manually
4646
press <kbd>⌘</kbd>+<kbd>S</kbd> to save the file after it is opened. Using the `application/octet-stream` MIME type to force downloads [can cause issues in Safari](https://github.com/eligrey/FileSaver.js/issues/12#issuecomment-47247096).
4747

48+
### iOS
49+
50+
saveAs must be run within a user interaction event such as onTouchDown or onClick; setTimeout will prevent saveAs from functioning properly. Due to restrictions in iOS saveAs opens in a new window instead of downloading, if you want this fixed please tell Apple how this bug is affecting you: [https://bugs.webkit.org/show_bug.cgi?id=102914](https://bugs.webkit.org/show_bug.cgi?id=102914)
51+
4852
Syntax
4953
------
5054

0 commit comments

Comments
 (0)