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

Bug in chaining #655

Closed
ibrahimBeladi opened this issue Oct 7, 2017 · 8 comments
Closed

Bug in chaining #655

ibrahimBeladi opened this issue Oct 7, 2017 · 8 comments

Comments

@ibrahimBeladi
Copy link

ibrahimBeladi commented Oct 7, 2017

I found a bug in chaining modals, for example, if you have two modals one for username modal chained with password modal and you entered the username and then pressed enter (not clicking the button), the event will be sent to both modals and hence the enter will be pressed for the second modal making it work in a mistaken behaviour. It is also happening in the example, check it out here too.
Chaining modals (queue) example

@limonte
Copy link
Member

limonte commented Oct 7, 2017

Thanks for reporting @ibrahimBeladi! Which browser and OS are you using?

@ibrahimBeladi
Copy link
Author

OS: Linux Zorin
Bug in Firefox 56.0 (64-bit) (Ubuntu)
Fine in Chromium (Version 61.0.3163.100 (Official Build) Built on Ubuntu , running on Zorin 12 (64-bit))

@limonte
Copy link
Member

limonte commented Oct 7, 2017

I can't reproduce the issue with the same configuration (Linux/Firefox). Probably you just holding Enter for too long :) As a workaround for this you can use allowEnterKey: false, here's the live demo: https://jsfiddle.net/ad3quksn/132/

PS in real-life cases there should be validators preventing submitting empty input values.

@limonte limonte closed this as completed Oct 7, 2017
@ibrahimBeladi
Copy link
Author

I am not holding Enter for too long for sure. In Chromium it doesn't happen unless I really hold Enter. But in Firefox it happens even with the fastest presses.

@limonte
Copy link
Member

limonte commented Oct 7, 2017

Many thanks for the clarification! I just released https://github.com/sweetalert2/sweetalert2/releases/tag/v6.10.2 take another look on https://sweetalert2.github.io/#chaining-modals, the reported issue should be fixed 👍

@limonte
Copy link
Member

limonte commented Oct 8, 2017

@ibrahimBeladi could you please confirm if the issue is fixed in Linux Zorin/Firefox, thanks!

@ibrahimBeladi
Copy link
Author

Oh I forgot to tell you since the issue is closed. It is working properly, thank you for your effort.

@limonte
Copy link
Member

limonte commented Oct 8, 2017

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants