There was an error while loading. Please reload this page.
2 parents 3c05dd6 + baa56c3 commit 6a25122Copy full SHA for 6a25122
src/handleScroll.ts
@@ -1,10 +1,12 @@
1
-import { Axis } from './types';
+import {Axis} from './types';
2
3
const alwaysContainsScroll = (node: HTMLElement): boolean =>
4
// textarea will always _contain_ scroll inside self. It only can be hidden
5
node.tagName === 'TEXTAREA';
6
7
const elementCanBeScrolled = (node: HTMLElement, overflow: 'overflowX' | 'overflowY'): boolean => {
8
+ if (!(node instanceof HTMLElement)) return false;
9
+
10
const styles = window.getComputedStyle(node);
11
12
return (
0 commit comments