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