The getScrollableParents
method throws a exception in shadow dom
#4014
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
The line below (At the bottom) will work as long as the parent is not a #document-fragment with nodeType = 11. Do not know what it will do with nodeType = 10?
Please see: Link
Your code does getScrollableParents and goes up the hierarchy. The moment the parent is a #document-fragment with nodeType = 11 it throws an error and it fails in overflowCheck on
let styleDeclaration = window['getComputedStyle'](node, null);
Because getComputedStyle does not work on a document-fragment. Although you test for parent.nodeType !== 9 (DOCUMENT_NODE), you do not also test for parent.nodeType !== 11 (DOCUMENT_FRAGMENT_NODE), and like I said, I do not have a test case on parent.nodeType === 10 (DOCUMENT_TYPE_NODE), so not sure what 10 will do.
primevue/components/lib/utils/DomHandler.js
Line 337 in e0194b3
I presume the line above should be changed to:
if (parent.nodeType < 9 && overflowCheck(parent)) {
The text was updated successfully, but these errors were encountered: