UNPKG

@material-ui/popper.js

Version:

A fork of popper.js to avoid the deprecation warnings: https://github.com/mui-org/material-ui/issues/19358.

12 lines (10 loc) 286 B
import getOffsetParent from './getOffsetParent'; export default function isOffsetContainer(element) { const { nodeName } = element; if (nodeName === 'BODY') { return false; } return ( nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element ); }