Dear All,

I've noticed incorrect scrolling the page in Chrome when the URL contains a
hash character.

This seems to be caused by the following script located in the main.js file:

var hash = window.location.hash;
if (hash) { 
   var targetOffset = $(hash).offset().top - 120;
   $('html,body').animate({scrollTop: targetOffset}, 200);
   return false;
}

While target offset is -195 in FF, it is 2200 in Chrome. The required anchor
is not scrolled precisely to its location, but ca 300 px towards the bottom.
However, on page reload it is sometimes correct, sometimes more or less than
the initial value. This inconsistency is really weird.

I've found several threads mentioning incorrect Chrome behaviour when
determining offset top value on StackOverflow, but it is not very clear to
me if this is our case.

Has anybody any experience with this or fix?

Thanks, Jan


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

Reply via email to