You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
349 B
8 lines
349 B
// @flow
|
|
import getComputedStyle from './getComputedStyle';
|
|
|
|
export default function isScrollParent(element: HTMLElement): boolean {
|
|
// Firefox wants us to check `-x` and `-y` variations as well
|
|
const { overflow, overflowX, overflowY } = getComputedStyle(element);
|
|
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
}
|