[Resolved] SweetAlert Prompt Not Working On Modal Dialog Bootstrap In Firefox

Have you ever experienced a sweetalert prompt box function blank or input box disabled when invoked via the bootstrap modal dialog on Mozilla firefox browser? I experienced it. So far I use chrome browser to test my application and runs well. When my client asks for an error on the application when calling the sweetalert prompt dialog box function, I just found out if there is an error in the plugin sweetalert prompt dialog box on modal dialog bootstrap in firefox browser.

Here An Image of sweetalert prompt box that is disabled when invoked via modal dialog bootstrap on Mozilla firefox:

Sweetalert Crash With Modal Dialog Bootstrap In Mozilla Firefox

This “enforceFocus” issue has been discussed on some GitHub and stackoverflow.com as follows:

The problem I faced is most likely due to the use of multiple bootstrap modal dialogs that makes the sweetalert plugin not work properly in firefox browser

How to problem solve crash at the sweetalert prompt box in firefox by adding 1 line script to “override enforceFocus” in modal dialog bootstrap. Please add the following script after the sweetalert plugin js is loaded.

I do not know what makes a sweetalert plugin crash with bootstrap modal dialog box on firefox, but with a line above the sweet alert prompt box runs well when invoking via bootstrap modal dialog on Mozilla firefox as shown below.

Sweetalert Plugin Run Well After Insert Enforcefocus Script

I once discussed about the sweetalert plugin on some of my articles:

Thus my short article about [Resolved] SweetAlert Prompt Not Working On Modal Dialog Bootstrap In Firefox

The following two tabs change content below.
This site is a personal Blog of Sigit Prasetya Nugroho, a Desktop developer and freelance web developer working in PHP, MySQL, WordPress.

Leave a Comment

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.