Created
July 24, 2020 20:22
-
-
Save uxder/6c8cef6c484e8b43e0aa00babec199c0 to your computer and use it in GitHub Desktop.
Debug Overflow issues for sticky
This file contains 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