Uppy: Uppy and SweetAlert2 bug

Created on 2 Jun 2019  路  4Comments  路  Source: transloadit/uppy

If use SweetAlert2 then there is a conflict with Uppy.

When the SweetAlert2 message is displayed and any button is pressed, the Uppy Dashboard is shown.

Live example:
https://gist.githack.com/epexa/110e28db117bed6a9b1ce8df6a2e7cd3/raw/4f503c7fc7dd244b62a46e8241d883abbf49ccae/uppy_sweetalert2_bug.html

Bug

Most helpful comment

Setting target: '#uppy', helps, because it makes uppy instance not be a direct child of a body.
I posted it as a bug to sweetalert2: https://github.com/sweetalert2/sweetalert2/issues/1648.

All 4 comments

Hi! Thanks for reporting. This looks a bug indeed, but it鈥檚 yet mysterious to me, how it can occur, when Uppy instance is isolated and SweetAlert2 doesn鈥檛 know about it.

One thought is browser history API, which we use for the browserBackButtonClose option, but it鈥檚 off by default.

@arturi Hi!

I was helped with the parameter change the "target".

Example:

target: '#uppy',

Live example:
https://gist.githack.com/epexa/1fe999461dd3f8784f420530892f77f5/raw/37a8393ebf368c0272bf469f13a9676d676f67cc/uppy_sweetalert2_bug_fix.html

It's a bug within SweetAlert2, that removes all aria-hiddens from the direct children of the body, and we depend on the aria-hidden attribute in order to hide our modal: https://github.com/sweetalert2/sweetalert2/blob/60dd1e7634fecb23d397041fab8fab3b37ed75f4/src/utils/aria.js#L24.

Setting target: '#uppy', helps, because it makes uppy instance not be a direct child of a body.
I posted it as a bug to sweetalert2: https://github.com/sweetalert2/sweetalert2/issues/1648.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anushkamds picture anushkamds  路  3Comments

skunkwerk picture skunkwerk  路  3Comments

aleccool213 picture aleccool213  路  3Comments

quetzyg picture quetzyg  路  3Comments

ogtfaber picture ogtfaber  路  4Comments