Skip to content

Comment on Sweet Alert for Bootstrap – Blends nicely with any Bootstrap based project

Comments

Nice style, and I appreciate that I can hit Esc to dismiss most of the dialogs, though unfortunately not all of them.

As another commenter said, I do wish that clicking outside of it had the same effect, but that may have more to do with what sites typically abuse these kinds of boxes for ("Alert! Sign up to our..." (no go away)).

One issue I noticed: there's a race condition in the second-to-last example ('...and by passing a parameter, you can execute something else for "Cancel".'), where if you hit escape quickly enough as the box gets launched, the cancellation handler does not run.

Re: your second point, on the original Sweet Alert page that this is based on it has this parameter:

allowOutsideClick - If set to true, the user can dismiss the modal by clicking outside it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.