Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Closing jQuery Mobile new popup cause page to refresh uselessly

I'm using the new jqm popup with the 1.2.0 alpha release and my problem is that my page from which I call the popup is refreshed uselessly when closing the popup using esc key or clicking on the screen... This refresh happen only the first time I close it. If I reopen and close again the popup the page is not refreshed...

It seems that for some reason jqm history mecanism get messed up....

It don't seem to be a built-in feature because this does not happen for any popup in the jqm demo page.

Any idea how to solve this issue?

Thanks

Etienne

like image 204
Etienne Desgagné Avatar asked Aug 10 '12 19:08

Etienne Desgagné


2 Answers

I had a similar problem and, as I did not need to use history in my case, I solved it disabling globally popup history like this:

$.mobile.popup.prototype.options.history = false;
like image 188
Pablo Avatar answered Sep 28 '22 01:09

Pablo


Found this post while having a similar problem on IE11 with jQuery Mobile 1.4.5

I found that I could prevent the "reload" when closing the popup by declaring the popup with the data-history="false" attribute in my HTML.

Ex:

...

like image 41
JA_251 Avatar answered Sep 28 '22 01:09

JA_251