Popper: getScrollParent should cover horizontal scroll (#9138)

pull/9225/head
banzhuanmei 2018-01-09 15:58:56 +08:00 committed by 杨奕
parent 15d528c768
commit fcbf7830b9
1 changed files with 1 additions and 1 deletions

View File

@ -1062,7 +1062,7 @@
if (parent === root.document) { if (parent === root.document) {
// Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is // Firefox puts the scrollTOp value on `documentElement` instead of `body`, we then check which of them is
// greater than 0 and return the proper element // greater than 0 and return the proper element
if (root.document.body.scrollTop) { if (root.document.body.scrollTop || root.document.body.scrollLeft) {
return root.document.body; return root.document.body;
} else { } else {
return root.document.documentElement; return root.document.documentElement;