From 6a74334417d85a790c356aea435dd3a0228a30c4 Mon Sep 17 00:00:00 2001 From: Michael Deal Date: Thu, 6 Nov 2014 15:09:41 -0800 Subject: [PATCH 1/3] Add note about iOS Hopefully this might help others not run into the same issue of executing outside of a user interaction event loop. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index a15fbaa..d71d4a1 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ See [ChenWenBrian's `saveTextAs()`](https://github.com/ChenWenBrian/FileSaver.js Blobs may be opened instead of saved sometimes—you may have to direct your Safari users to manually press +S 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). +### iOS + +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) + Syntax ------ From 86fb7e9f8f47c3b0bae2dd32dd84a96ddd8a66aa Mon Sep 17 00:00:00 2001 From: Michael Deal Date: Thu, 6 Nov 2014 15:11:02 -0800 Subject: [PATCH 2/3] tweak link to bug report --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d71d4a1..0fc7bf0 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ press +S to save the file after it is opened. Using the ### iOS -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) +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](https://bugs.webkit.org/show_bug.cgi?id=102914) how this bug is affecting you. Syntax ------ From f1132903ff9f993444fcc8819d5f943937c5eb74 Mon Sep 17 00:00:00 2001 From: Michael Deal Date: Thu, 6 Nov 2014 15:11:56 -0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0fc7bf0..70fc6f2 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ press +S to save the file after it is opened. Using the ### iOS -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](https://bugs.webkit.org/show_bug.cgi?id=102914) how this bug is affecting you. +saveAs must be run within a user interaction event such as onTouchDown or onClick; setTimeout will prevent saveAs from triggering. Due to restrictions in iOS saveAs opens in a new window instead of downloading, if you want this fixed please [tell Apple](https://bugs.webkit.org/show_bug.cgi?id=102914) how this bug is affecting you. Syntax ------