-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
tab is not working in the form when sweet alert is pop up #391
Comments
The same think happens to me. |
Yup, happens to me as well. Also, hitting enter to dismiss the pop up removes the focus from the page and you cannot focus on the page again without clicking. |
remove window events in doneFunction resolve this. swal({
title: "Are you sure?",
text: "You will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
closeOnConfirm: false
}, function(){
// remove these events;
window.onkeydown = null;
window.onfocus = null;
swal("Deleted!", "Your imaginary file has been deleted.", "success");
}); |
@fxghqc removing event handlers in the callback works for me. Can this be included in the main code to prevent this bug? |
+1 |
When will this be fixed? |
+1 |
Is there any fork of this bug I can work with ? I am not sure how to use @xiaouze88's commit. |
This bug still exists. You can even see it on the main sweetalert demo page... http://t4t5.github.io/sweetalert/ Simply click the Try Me button for the AJAX example and then notice that tab no longer works. I can see in the debugger that window.onfocus is not being restored to null afterwords. If I manually set it then I can use tab again. But setting it to null in the callback function passed to swal() does NOT work for me. I set it to null there, but something else internal to Sweetalert is setting it back before the whole process ends. Breaking into the debugger several seconds later confirms this. Please fix! |
I can confirm this behavior as well. It's intermittent, the best type of bug... |
I am experiencing the exact same issue as well. When the SweetAlert pop-up is closed, tabs in the page's form stops working even with |
I will make a PR tomorrow with a fix for this.
…On Tue, 3 Jan 2017 at 21:15, Neel ***@***.***> wrote:
I am experiencing the exact same issue as well. When the SweetAlert pop-up
is closed, tabs in the page's form stops working even with tabindex set.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#391 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHWwZbRIQD1HLSs4WpN87HRyeBlvGgcuks5rOp43gaJpZM4FNSiU>
.
|
That will be really great @Eduardjs Thank you for that. For now I am using the solution from @JustinWinthers in another thread:
REF: #127 |
@Mr-Anonymous
|
Wow! I just found this thread. I spent days on wondering why my tabs work and then they don't. Now I realize that sometimes I use a sweetalert and that's the reason it stopped! Is anyone still working on a fix for this and what's the best solution to deal with it for now? Edit: just saw the sweetalert2 message above. I didn't know there is another version, so I will give it a go, but there is quite a bit of work to be done to migrate! |
@elasticsteve If you pay attention to the other threads on this repo you will notice this one is not maintained anymore. There is another repo called SweetAlert2, which you should really port your apps towards. If you still want to use this version though, the only solution is this one. I forgot to make a PR.. didn't have enough time. @edwin1217's solution is the one you should go with. |
@edwin1217's solution is nearly the same i have posted in thread #127 a while ago. |
Thanks everyone. I tried to port over to SweetAlert2, but had to give up. I couldn't make a simple text input with |
@kosst Yes, your solution is much better, because with the one from @edwin1217 the default Enter key action for OK and error messages (input text modals) wouldn't work. Here again what's working for me best:
|
I know it's been a really long time, but would you be kind enough to explain as to how I can call this function as a whole in another function? Where should I place this snippet in controller?
|
change - that's it... it worked for me |
Hi everyone, I know it has been long but did any of you found a solution for this? I am still experiencing the same problem with Angular 12. |
I am using sweet alert in the html form which is popup on button click but the when i click on ok button of popup, the tab index does not work after that and i have to click each and every field to fill it.
The text was updated successfully, but these errors were encountered: