Fix popper.js bug in IE, #291

pull/297/head
qingwei.li 2016-10-10 11:34:22 +08:00
parent 86f1cf7b21
commit 24f9776f45
1 changed files with 4 additions and 1 deletions

View File

@ -1058,7 +1058,10 @@
['scroll', 'auto'].indexOf(getStyleComputedProperty(element, 'overflow-x')) !== -1 ||
['scroll', 'auto'].indexOf(getStyleComputedProperty(element, 'overflow-y')) !== -1
) {
return element;
// If the detected scrollParent is body, we perform an additional check on its parentNode
// in this way we'll get body if the browser is Chrome-ish, or documentElement otherwise
// fixes issue #65
return element === root.document.body ? getScrollParent(element.parentNode) : element;
}
return element.parentNode ? getScrollParent(element.parentNode) : element;
}