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

URI parameters are striped out when using new pagebeforechange event #74

Open
asxjackal opened this issue May 14, 2013 · 4 comments
Open

Comments

@asxjackal
Copy link

Parameters are striped out when using new special pagebeforechange event.

jQueryMobile-router v20130504
jquery.mobile-1.3.1

works fine on jQueryMobile-router v20130416

none-ajaxApp, multipage-template

@azicchetti
Copy link
Owner

Hi,
thanks, fixed!

I'm pushing the fix on the git in a few hours as soon as I've finished testing a small feature, but I'll attach the patch here 'cause it's really trivial:

          $.mobile.changePage(ui.toPage, {
            _jqmrouter_handled: true,
            _jqmrouter_bC: true,
            dataUrl: ui.options.dataUrl
          })

I've just added the dataUrl: ui.options.dataUrl parameter.
The patch should be applied inside the bCDeferred.done(function(){ callback.

azicchetti added a commit that referenced this issue May 14, 2013
… defaultArgsRe) to

automatically append an argument-catcher regexp to the end of the routes.

Issue #74 was also fixed.
@asxjackal
Copy link
Author

now how does one refresh the page?
before i could have called

$.mobile.changePage(hash, {
samePageTransition: true,
allowSamePageTransition: true,
transition: 'none',
showLoadMsg: false
});
to reload the page.

how can I re-call the eventhandler to reload the page?

@azicchetti
Copy link
Owner

can't understand the use case.
Do you mean a link pointing to the same page?

If that were the case, pagebeforechange is still triggered, although the same-page transition does not happen.

@asxjackal
Copy link
Author

Well, if you want to trigger the event without use of a hyperlink but pragmatically based on some logic or user's interaction, that's why jQuery Mobile has $.mobile.changePage(). For instance pull to refresh.

never mind I think i solved it if I do this to pragmatically refresh the page
$.mobile.changePage(hash, {
samePageTransition: true,
allowSamePageTransition: true,
transition: 'none',
showLoadMsg: false,
_jqmrouter_bC: true,
dataUrl: $.mobile.path.parseUrl(window.location.href).hash
});

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

No branches or pull requests

2 participants