# iOS file viewer breaks BF

**URL:** <https://forum.klai.studio/t/ios-file-viewer-breaks-bf/373>\
**Category:** Support\
**Created:** [July 20, 2021, 3:38pm UTC](https://forum.klai.studio/t/ios-file-viewer-breaks-bf/373 "2021-07-20T15:38:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MJ-APJ](https://forum.klai.studio/letter_avatar_proxy/v4/letter/m/49beb7/32.png) [@MJ-APJ](https://forum.klai.studio/u/MJ-APJ)\
**Post date:** [July 20, 2021, 3:38pm UTC](https://forum.klai.studio/t/ios-file-viewer-breaks-bf/373/1 "2021-07-20T15:38:22Z")

</div>

Customer has just bought to my attention a problem on one of my sites, there is a page which allows the customer to download files stored on the server, this is all working correctly and on iOS a dialog pops up asking whether to view or download the file.

 ![IMG_6D02182CAB7F-1](https://forum.fmbetterforms.com/uploads/default/original/1X/daaa5fbf88dec1bfbcb63a5f21354af8ddd9cc95.jpeg)  
Download works perfectly and view works ok if the file is an image, but if the file is a docx there is a problem. The file will display properly using the inbuilt file viewer but when the customer navigates back to return to the downloads page, almost everything is unresponsive and when a button is pressed to trigger a path action the following error is shown.

 ![IMG_0B6E8CF0C635-1](https://forum.fmbetterforms.com/uploads/default/original/1X/7e2f59219986350698bc670b99a84474b82663b5.jpeg)

No idea how best to deal with this as it seems to be at a lower level than I have access to in the code base, any ideas?

---

<div class="post-metadata">

**Author:** ![delfs](https://forum.klai.studio/user_avatar/forum.klai.studio/delfs/32/411_2.png) [@delfs](https://forum.klai.studio/u/delfs)\
**Post date:** [July 24, 2021, 12:23pm UTC](https://forum.klai.studio/t/ios-file-viewer-breaks-bf/373/2 "2021-07-24T12:23:59Z")

</div>

That error seems to be thrown from the device browser and BF is only surfacing it.  
I suspect some type of security trap as it thinks your doc is trying to run JS.

A quick google shows its a common issue, how ever I did not google for a solution but, I suspect there is one.

My suspicion is

- Browser app (BF) opens a doc that could be malicious
- After doc opens browser sees JS code try to run
- Browser thinks cdoe came from the doc
- Browser blocks execution

So, perhaps the way in which it’s opened …

HTH

c
