Fixes scrollIntoView when scrollbars are hidden

This commit is contained in:
Yury Delendik 2012-08-28 16:29:47 -05:00
parent c2cfa99cc8
commit c53b7aacfc

View File

@ -38,6 +38,8 @@ function scrollIntoView(element, spot) {
while (parent.clientHeight == parent.scrollHeight) {
offsetY += parent.offsetTop;
parent = parent.offsetParent;
if (!parent)
return; // no need to scroll
}
if (spot)
offsetY += spot.top;