JQuery Mobile is usually a very comprehensive package. Although it is under constant development most of the features are suitable for common uses on release time. Other, more enhanced and unique features, are released afterwards.
JQuery Mobile 1.2.0 introduced the popups feature, definitely one of the most needed in mobile applications. I (and I’m sure many others) actually upgraded to this version solely because of the popups feature.
The first popup I’ve made using JQM was a message popup that redirects the user upon clicking on its only button. What I found out is that clicking outside the popup area closes it, which is totally unacceptable UX-wise.
I found nothing that helps solving it in the documentation and I was sure it was another obvious miss of mine. After posting a question in JQuery Mobile’s GitHub issues forum I went to Stack Overflow, there I got the perfect solution:
These few lines of code will do the work until the JQuery Mobile team will deliver this feature via an option passed to the popup function.