Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support on first page and refreshes #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kieranshaw
Copy link

The previous implementation worked fine for loading an index.html and then using links or $.mobile.changePage() to change pages.

However, it did not work when you refresh the page or if you start on a page with a parameterised hash address, such as #eventPage-123.

It now uses changePage on the first page load to force the correct behaviour.

…s you can refresh a page and get it to work, not just have it work on internal navigation
@jirih
Copy link

jirih commented Feb 1, 2013

This is my workaround (I feel this is not a fix):

var path = $.mobile.path.get();

if ( path == "" || $(("#"+($.mobile.path.get().replace( /\?.*/, "" ).replace( /\&.*/, "" )))).length>0)
     e.preventDefault();

@twilly86
Copy link

twilly86 commented Feb 7, 2013

It looks like this has changed a bit with the release of 1.3.0

http://jquerymobile.com/demos/1.3.0-rc.1/docs/pages/page-navmodel.html

When I would load a page with paremeters in it before, it would redirect to the home page, now it atleast doesn't redirect, but I still don't have any of the data in the url.

@karl-gustav
Copy link

So if I want to use extra parameters in hash values AND be able to bookmark pages i have to use this fork(Kieran Shaw's fork)?
(I assume that if reload don't work, bookmarks won't either)

And that that the only drawback this fork has compared to the master branch is that if I link to a non existing hash MobileJQuery won't work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants