Dqni Bodi
Dqni Bodi

Reputation: 33

Page scrolls in the middle on load

I don't know why, but when my page loads, i get scrolled in the middle, but i don't have any anchor aiming on this point...
Now i have to put a <a href='MY-URL#top'></a> anchor in every page for not getting scrolled on the middle...(Firefox don't even get them :0, -webkit browsers do...)
I have many anchor aiming on id's, and a JQuery script for smooth scrolling, but no one for the middle scrolling of pages on load.

You can see that here :

http://www.groupae.be/ediser/2.0/nos_produits.php

What would fire that scrolling on load?

Upvotes: 0

Views: 2919

Answers (2)

Sebastian Lipnicki
Sebastian Lipnicki

Reputation: 51

If the page is long enough to have scroll and if you set focus on some element (for example for accessibility features), browser scrolls page in such way that focused element is in the middle of the screen (if scrolls allows to do it, if not it will be scrolled as far as possible).

Upvotes: 3

Dqni Bodi
Dqni Bodi

Reputation: 33

its ok i found why i was getting scrolled, just the autofocus in the footer form... :/

Upvotes: 3

Related Questions