PDA

View Full Version : Adress bar is over text when you linking on page in iPad & iPhone



lantiqo
07-21-2012, 08:54 PM
I added a tag in html, and it is used before the page finishes loading.
If you run the page in an iPhone or iPad (before the page finishes loading) the address bar is over the text when clicking on links, and you have to scroll to get to the top.

I want people to be on top without the address bar is over the text when you click on the links.

webpage (http://wwwlab.iki.his.se/~e11vicka/cafe2)



function modLinks()
{ var links = document.getElementsByTagName('a');
for(var i=0;i<=links.length-1;i++)
{
if(links[i].getAttribute('tag')=='before')
{
links[i].href = '#/' + links[i].href.split('#')[1];
}
}
}

bernie1227
07-22-2012, 02:09 AM
That isn't happening for me in any of the mobile browsers I've tested it on. The only thing I can think of, is that in safari, the browser remembers where you were or how zoomed in you are in the page when you leave it.
This code here:


<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

Placed in the head, will cause the size to be the same size as the browser, hopefully stopping your problem.

lantiqo
07-22-2012, 03:02 PM
That isn't happening for me in any of the mobile browsers I've tested it on. The only thing I can think of, is that in safari, the browser remembers where you were or how zoomed in you are in the page when you leave it.
This code here:


<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">

Placed in the head, will cause the size to be the same size as the browser, hopefully stopping your problem.No, I have already tested the page with no zoom for the iPhone but it's the same (but I wanted it to zoom).

But the first link "The Cafe" is working and you find yourself always on top (with the address bar)

bernie1227
07-22-2012, 10:25 PM
At the moment I'm testing this on an iPad and theres no problem, so I don't know what the problem would be with the iPhone.