Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

loadPage Cannot read property 'prefetch' of undefined #5877

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

loadPage Cannot read property 'prefetch' of undefined #5877

evilripper opened this issue Apr 11, 2013 · 5 comments
Assignees
Milestone

Comments

@evilripper
Copy link

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
Copy link

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
Copy link
Author

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! :)

@jaspermdegroot
Copy link
Contributor

This is probably a regression from commit be22887.

@jaspermdegroot
Copy link
Contributor

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

@jaspermdegroot jaspermdegroot reopened this May 2, 2013
arschmitz added a commit that referenced this issue May 6, 2013
…tch property Fixes #5877 - loadPage Cannot read property 'prefetch' of undefined and addresses execption from #5951

Conflicts:
	js/jquery.mobile.navigation.js
@shavo0915
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants