jquery-archive / jquery-mobile

jQuery Mobile Framework
https://jquerymobile.com
Other
9.7k stars 2.41k forks source link

phonegap: Pages with data-ajax="false" on form fail to load #1580

Closed jblas closed 13 years ago

jblas commented 13 years ago

This problem was originally reported in issue 1578 where one user was trying to test the fix for 1578 but was experiencing a page load that never seems to finish. That is, the JQM load message just sits there spinning.

The page that was being loaded was a markup fragment that contained a data-role="page" div with a form that had @data-ajax="false". If I removed the @data-ajax attribute things seemed to load just fine.

jblas commented 13 years ago

I should've noted in the original report above that the hang can be seen in a phonegap app loaded in the iOS iPhone 4.2 Emulator on the Mac.

jblas commented 13 years ago

This does NOT seem to be a problem with phonegap on Android.

jblas commented 13 years ago

Ok, found the problem ... it is real. :-)

In the $.ajax() callback, we look for elements with @href, @src, and @data-ajax="false" elements, the code then assumes that matching elements will have either @href or @src, which of course forms don't ... they have @action ... so the code throws an exception because thisUrl is undefined.

Patch on its way.

jblas commented 13 years ago

Fix landed on the HEAD:

https://github.com/jquery/jquery-mobile/commit/e597ccb381913308ce4c31662c8eba67509f8c1a

ghost commented 13 years ago

Confirm fixed in 4.3 iphone simulator on osx.