10 lines
440 B
Plaintext
10 lines
440 B
Plaintext
import getComputedStyle from "./getComputedStyle.js";
|
|
export default function isScrollParent(element) {
|
|
// Firefox wants us to check `-x` and `-y` variations as well
|
|
var _getComputedStyle = getComputedStyle(element),
|
|
overflow = _getComputedStyle.overflow,
|
|
overflowX = _getComputedStyle.overflowX,
|
|
overflowY = _getComputedStyle.overflowY;
|
|
|
|
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
} |