azicchetti/jquerymobile-router

jQM 1.3.0

Opened this issue · 8 comments

Is it save to upgrade my app to jQM 1.3.0? Are there any know issues with jquerymobile-router not listed here?

Hi,
no, I'm uploading the new version in a few minutes.
I've not tested it thoroughly but it seems to work.

Hi,
this issue should be solved by jquery mobile guys, I was hoping they could fix it for the 1.3.0 but it seems they didn't.
jquery-archive/jquery-mobile#5230
jquery-archive/jquery-mobile#5085

To sum this up, we asked for native support for hash parameters in jQM and they added it in 1.2.1, but there were problems because it wasn't working for deep links.

I'll look into the new jQM APIs to find a way to temporarily support them by patching the router.

Oops accidentally deleted my post. For the record: After clicking a link like #foo?bar=baz the url parameter was gone.

I am setting the url paramter now in the router with location.hash = #foo?bar=" + getParams(match[1]).

Edit: My method is not a good approach, the history is all messed up.

We have to try the new method:
http://api.jquerymobile.com/jQuery.mobile.navigate/

I'm positive we can temporarily fix this problem by using that one, but I'm at work now, I'll try a couple of things in the weekend and get back to you.

It would be great if you could test that method in the meanwhile.
Thanks!

Yeah, I noticed that method too. I will play around with it.

After looking at it: $.mobile.navigate('#foo?bar=baz') ist the way to go but I can't get it to work so the browser and JQM history are in correct state.

I think I've found a simple patch to retain hash parameters.
I've pushed it to the git, hopefully this solves the problem until jQM guys fix it on their end.

Thanks, I will check it out.

Works like a charm. And a easy solution too, even without $.mobile.navigate(). Thanks!