You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to put a form inside the alert as html which works nicely. Unfortunately swal likes to take the focus for its own buttons.
Looking through issues/prs I see there is support for a prompt type but I'm wondering if it wouldn't be better to handle custom html (with forms) nicer rather than implement more features. This could probably be solved with a small amount of code which tests if there are inputs in the text and focusing the first instead.
Wanted to know what you think, as I think this would be more extensible than the prompt feature.
The text was updated successfully, but these errors were encountered:
At its current state, SweetAlert is really not made for handling complex HTML.
The plan I have in mind is to get the simple alert/prompt functionality as stable and nice as possible first.
Once that's done, I think we can start expanding the functionality of SweetAlert to be more of a general popup library where you can add your own markup and just reference the element to "Sweetify" it. But I think we should be careful to jump into that too soon when the basics are still changing. If (or when) we do it, it should be thought through and done right. :)
I've been trying to put a form inside the alert as html which works nicely. Unfortunately swal likes to take the focus for its own buttons.
Looking through issues/prs I see there is support for a prompt type but I'm wondering if it wouldn't be better to handle custom html (with forms) nicer rather than implement more features. This could probably be solved with a small amount of code which tests if there are inputs in the
text
and focusing the first instead.Wanted to know what you think, as I think this would be more extensible than the prompt feature.
The text was updated successfully, but these errors were encountered: