BookStack icon indicating copy to clipboard operation
BookStack copied to clipboard

When viewing/editing a draw.io drawing, user is not able to export draw.io drawing in vsdx format on Safari

Open yuelu714 opened this issue 2 years ago • 7 comments

Describe the Bug

When viewing/editing a draw.io drawing in a document, user is not able to export draw.io drawing in vsdx format on Safari. The same process works on Chrome.

Steps to Reproduce

  1. Go to a page that contains a draw.io drawing and choose to Edit the page.
  2. Double click on the drawing to go to "Edit" mode in embedded draw.io tool.
  3. In draw.io took, go to "File"->"Export as"->"VSDX(beta)"
  4. In the popup window, enter the file name in "Save As:", then click on "OK" button.
  5. Nothing happens. File is not saved

Expected Behaviour

It is supposed to save/download a copy of the draw.io drawing in vsdx format.

Screenshots or Additional Context

No response

Browser Details

Safaro Version 17.1.2 (19616.2.9.11.12)

Exact BookStack Version

v23.08.3

yuelu714 avatar Dec 04 '23 23:12 yuelu714

Hi @yuelu714, Thanks for reporting but for BookStack I cannot really cover the full scope of draw.io under our support. If there's anything we can specfically do, then I'm happy to hear about it, otherwise this is likely something on the side of draw.io itself. Your query may be better suited here.

ssddanbrown avatar Dec 04 '23 23:12 ssddanbrown

We tried it using draw.io site on Safari and can’t replicate it. It worked just fine when exporting.

yuelu714 avatar Dec 06 '23 21:12 yuelu714

Just want to let you know that v23.12.1 still has the same issue.

yuelu714 avatar Jan 22 '24 22:01 yuelu714

Taking a look at this, it looks to be due to CSP since I can replicate in Firefox.

Setting the below option for BookStack (.env option) may work:

ALLOWED_IFRAME_SOURCES="blob: https://*.draw.io https://*.youtube.com https://*.youtube-nocookie.com https://*.vimeo.com"

Not sure though as I've not tested it yet, and have not tested if that can be made specific to draw.io emebed.

ssddanbrown avatar Jan 22 '24 23:01 ssddanbrown

That setting didn't fix it.

yuelu714 avatar Jan 22 '24 23:01 yuelu714

Hi @yuelu714, I just tested this using the above option in BookStack v24.02.3 and Safari 17.4.1, and using this option allows VSDX export download in Safari (and Firefox) in my instance of testing.

  • Was the setting change made before the BookStack page editor view was loaded?
  • Are you using the default draw.io embed or do you have a custom instanced linked using the BookStack DRAWIO env option?

ssddanbrown avatar May 04 '24 12:05 ssddanbrown

For me, adding blob: did fix the issue.

vincentbernat avatar Jun 30 '24 05:06 vincentbernat