app-router icon indicating copy to clipboard operation
app-router copied to clipboard

Blank page (mostly) on hash route reloads with iOS/OSX Safari

Open nomego opened this issue 9 years ago • 3 comments

If I navigate with Safari to https://erikringsmuth.github.io/app-router, it (usually?) works as it should (even though the page is blank for a long time).

Navigating to a sub page like https://erikringsmuth.github.io/app-router/#/api also works, until I reload that page. Usually, I end up with a blank page, but in some occasions I get the intended page rendering. This hints about some kind of race condition somewhere.

This is on everything from iPhone 4/iPad mini to a MacBook running Safari 8.0.3 on Mac OS X Yosemite.

In our app, I can detect that reloading a page with a hash route never fires the state-change event, but we're doing some other things in and around app-router, so I'm not sure that's the whole truth.

Let me know if you want me to do any other tests to pin this bug down.

nomego avatar Mar 23 '15 10:03 nomego

In our app, we init appRouter manually and moving the init from the ready() polymer event handler to readyDom() in our wrapping application element seems to init appRouter late enough that our application element had time to register the event listener for state-change. Maybe something similar happens on automatic init (on your site).

nomego avatar Mar 23 '15 17:03 nomego

Yeah, I see the problem too. It might be something with the timing in the webcomponentsjs polyfill. I'll have to try to figure out how to debug iOS devices.

erikringsmuth avatar Mar 23 '15 20:03 erikringsmuth

This is weird! I can see all the elements in the dom throughout the screen when I inspect elements but nothing renders. This might be a Safari bug.

erikringsmuth avatar Mar 24 '15 03:03 erikringsmuth