diff --git a/packages/base/src/util/isElementContainingBlock.ts b/packages/base/src/util/isElementContainingBlock.ts index cef9d9f1132b..ca8c2a8570f2 100644 --- a/packages/base/src/util/isElementContainingBlock.ts +++ b/packages/base/src/util/isElementContainingBlock.ts @@ -2,11 +2,11 @@ const isElementContainingBlock = (el: HTMLElement) => { const computedStyle = getComputedStyle(el); return ["size", "inline-size"].indexOf(computedStyle.containerType) > -1 - || ["transform", "perspective"].indexOf(computedStyle.willChange) > -1 - || ["layout", "paint", "strict", "content"].indexOf(computedStyle.contain) > -1 - || computedStyle.transform !== "none" - || computedStyle.perspective !== "none" - || computedStyle.backdropFilter !== "none"; + || ["transform", "perspective"].indexOf(computedStyle.willChange) > -1 + || ["layout", "paint", "strict", "content"].indexOf(computedStyle.contain) > -1 + || (computedStyle.transform && computedStyle.transform !== "none") + || (computedStyle.perspective && computedStyle.perspective !== "none") + || (computedStyle.backdropFilter && computedStyle.backdropFilter !== "none"); }; export default isElementContainingBlock;