* Test if the element is scrollable recursively * @param {HTMLElement} container * @returns
(container)
| 721 | * @returns |
| 722 | */ |
| 723 | function testScrollable(container) { |
| 724 | if (!container || container === lastEl) return false; |
| 725 | |
| 726 | const { scrollHeight, offsetHeight, scrollWidth, offsetWidth } = container; |
| 727 | |
| 728 | if (scrollHeight > offsetHeight) return true; |
| 729 | if (scrollWidth > offsetWidth) return true; |
| 730 | |
| 731 | lastEl = container; |
| 732 | |
| 733 | return testScrollable(container.parentElement.closest(".scroll")); |
| 734 | } |
| 735 | }); |
| 736 | |
| 737 | preventSlideTests.push((target) => { |