tmeasday / meteor-router

MIT License
366 stars 76 forks source link

Android 2.*: does not update location bar or history #42

Open tom-adsfund opened 11 years ago

tom-adsfund commented 11 years ago

Back button returns to previous page before entering website

tom-adsfund commented 11 years ago

If the normal way can't work, that version of Android does provide history for anchors.

tmeasday commented 11 years ago

Hmm. I don't have a android to test on.

  1. Does page.js work?
  2. Does normal history.pushState etc work?

Have you tried using the HTML5-History-API polyfill? (see: https://github.com/tmeasday/meteor-router#internet-explorer-8-support; you won't need to use the ie-support branch however).

tom-adsfund commented 11 years ago

If you can suggest a site that uses page.js I can check.

I used this site (http://html5.gingerhost.com/), which claims to use pushState, and it works on Android 2.*. (I clicked Seattle, and it had desired location and history effect.)

I am using the branch and the polyfill.

tmeasday commented 11 years ago

So the URLs change on that gingerhost site? Without using anchors?

If so it sounds like pushState works and my best guess is going to be a problem with page.js.

It wouldn't be too hard to create a very simple test page that use page.js and see if successfully does pushState etc. If you can figure out exactly which library is failing, then it'll be easier to find a fix.

tom-adsfund commented 11 years ago

Yes, without using anchors.

I can't dedicate time to testing for libs.

But what about sharing links...? That's quite important. (As mentioned in https://github.com/tmeasday/meteor-router/issues/33#issuecomment-13917835)

tom-adsfund commented 11 years ago

Bug caused by ie-support branch.

tmeasday commented 11 years ago

Which device did you find this behaviour on?

I just tested the IE support branch (deployed at simple-routed-app.meteor.com) in 2.2 and 2.3 on browserstack.com and didn't see any problems.

tom-adsfund commented 11 years ago

My physical device (Moto Droid), running 2.2.1: click first link on simple... and look at the location bar -- hasn't changed; press back button, will return to previous app or website (should return to first page of simple...)

tmeasday commented 11 years ago

How bizarre,

I've tested http://simple-routed-app.meteor.com (using browserstack (an emulator) as I don't have an actual device) on

And all of them work fine given the reproduction steps you've outlined.

I don't really know what I can do from here. Is there any kind of error console you can look at?

tom-adsfund commented 11 years ago

No console. Oh well. If someone else is concerned they can follow it up

Tarang commented 11 years ago

Meteor router seems to route fine for me, but the Meteor.Router.to function has throws an error somewhere/doesnt work, its a bit difficult to debug since its only on the device & I have to hook into it using jsconsole. I'll have to check up and put a bit more on about it