Created
July 24, 2020 20:22
-
-
Save uxder/a04cc1f51705e26c741f7fa118f93f6c to your computer and use it in GitHub Desktop.
Debug Overflow issues for sticky
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let parent = document.querySelector('.sticky-element').parentElement; | |
while (parent) { | |
const hasOverflow = getComputedStyle(parent).overflow; | |
if(hasOverflow !== 'visible') { | |
console.log(hasOverflow, parent); | |
} | |
parent = parent.parentElement; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment