mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Takes top border width in account (cont #2874)
This commit is contained in:
parent
91ab83a69a
commit
3a5258d069
1 changed files with 2 additions and 1 deletions
|
@ -63,7 +63,8 @@ function scrollIntoView(element, spot) {
|
|||
// Assuming offsetParent is available (it's not available when viewer is in
|
||||
// hidden iframe or object). We have to scroll: if the offsetParent is not set
|
||||
// producing the error. See also animationStartedClosure.
|
||||
var parent = element.offsetParent, offsetY = element.offsetTop;
|
||||
var parent = element.offsetParent;
|
||||
var offsetY = element.offsetTop + element.clientTop;
|
||||
if (!parent) {
|
||||
console.error('offsetParent is not set -- cannot scroll');
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue