-2

I'm using iscroll because of its great features of fixed header/footer.

I have links in the footer. When in normal safari, it all works fine. When the webapp is saved to the home screen, and then launched, after a link is clicked they close the webapp and launch safari.

I've tried AJAX with no good luck.

Can someone please help.

dave
  • 123
  • 1
  • 2
  • 8

1 Answers1

0

This isn't due to iScroll, it's the same behavior in all web apps in full screen mode. Can easily be solved with this script. It's minified, and I don't remember where the original source is, but it works great. I believe it changes href's to onclick's.

<script type="text/javascript">(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")

Niclas
  • 1,362
  • 1
  • 11
  • 24