Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uppy and SweetAlert2 bug #1627

Closed
epexa opened this issue Jun 2, 2019 · 4 comments
Closed

Uppy and SweetAlert2 bug #1627

epexa opened this issue Jun 2, 2019 · 4 comments
Assignees
Labels

Comments

@epexa
Copy link
Contributor

epexa commented Jun 2, 2019

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

@epexa epexa changed the title uppy and sweetalert2 bug Uppy and SweetAlert2 bug Jun 2, 2019
@arturi
Copy link
Contributor

arturi commented Jun 4, 2019

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

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

@arturi arturi removed the Triage label Jun 4, 2019
@epexa
Copy link
Contributor Author

epexa commented Jun 7, 2019

@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

@lakesare
Copy link
Contributor

lakesare commented Jul 8, 2019

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.

@lakesare
Copy link
Contributor

lakesare commented Jul 8, 2019

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: sweetalert2/sweetalert2#1648.

@lakesare lakesare closed this as completed Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants