Fixed #4014 - The `getScrollableParents` method throws a exception in shadow dom
parent
af29b218a5
commit
f23e5adc07
|
@ -357,9 +357,13 @@ export default {
|
|||
const overflowRegex = /(auto|scroll)/;
|
||||
|
||||
const overflowCheck = (node) => {
|
||||
let styleDeclaration = window['getComputedStyle'](node, null);
|
||||
try {
|
||||
let styleDeclaration = window['getComputedStyle'](node, null);
|
||||
|
||||
return overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY'));
|
||||
return overflowRegex.test(styleDeclaration.getPropertyValue('overflow')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowX')) || overflowRegex.test(styleDeclaration.getPropertyValue('overflowY'));
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
for (let parent of parents) {
|
||||
|
|
Loading…
Reference in New Issue