loadPage Cannot read property 'prefetch' of undefined #5877

Closed
evilripper opened this Issue Apr 11, 2013 · 5 comments

Projects

None yet

5 participants

@evilripper

I have some problem with the prefetch option: in my code I load some page created dynamically but now in firefox I get this error
TypeError: options is undefined
in chrome the same
TypeError: Cannot read property 'prefetch' of undefined
if i set the option on loadPage("#shajshs", true) it works! O_o
example code:
http://jsfiddle.net/evilripper/d5eK6/1/

I posted about this on this commit c8a8046
however I'm not sure it is caused by this fix! :)

@vladimirGI

i guess you load the page by calling $.mobile.loadPage(pageUrl);
while the issue should be fixed in JMQ here is the workaround:
$.mobile.loadPage(pageUrl, {prefetch:"true"});

@evilripper

yes by loadPage, my page is already in the dom(it contains some custom widget and i must preload the data calling the loadpage [it is a stupid project on phonegap]), i must set prefetch to true in the options... thanks! :)

@arschmitz arschmitz was assigned May 1, 2013
@jaspermdegroot
Member

This is probably a regression from commit be22887.

@arschmitz arschmitz added a commit that closed this issue May 1, 2013
@arschmitz arschmitz Prefetch: Check for existance of options object before checking prefe…
…tch property Fixes #5877 - loadPage Cannot read property 'prefetch' of undefined and addresses execption from #5951
9648130
@arschmitz arschmitz closed this in 9648130 May 1, 2013
@jaspermdegroot
Member

Re-opening because the fix isn't in 1.3-stable yet.

@jaspermdegroot jaspermdegroot reopened this May 2, 2013
@arschmitz arschmitz added a commit that referenced this issue May 6, 2013
@arschmitz arschmitz Prefetch: Check for existance of options object before checking prefe…
…tch property Fixes #5877 - loadPage Cannot read property 'prefetch' of undefined and addresses execption from #5951

Conflicts:
	js/jquery.mobile.navigation.js
3c53106
@shavo0915

I am getting this same issue in 1.3.2. The work around works but it doesn't load any of the icons for buttons etc. so it breaks that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment