mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 14:48:08 +02:00
Fixes scrollIntoView when scrollbars are hidden
This commit is contained in:
parent
c2cfa99cc8
commit
c53b7aacfc
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue