Bug Report
- Package version(s): 5.37.0
- Browser and OS versions: NA
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Products/sites affected: (if applicable)
Describe the issue:
Sticky component loops forever if background-color is not set for page
Actual behavior:
This loop in _getBackground() never exits
while (window.getComputedStyle(curr).getPropertyValue('background-color') === 'rgba(0, 0, 0, 0)' ||
window.getComputedStyle(curr).getPropertyValue('background-color') === 'transparent') {
if (curr.parentElement) {
curr = curr.parentElement;
}
}
Expected behavior:
Should check for curr == html and return
If applicable, please provide a codepen repro:
Bug Report
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: Normal
Products/sites affected: (if applicable)
Describe the issue:
Sticky component loops forever if background-color is not set for page
Actual behavior:
This loop in _getBackground() never exits
while (window.getComputedStyle(curr).getPropertyValue('background-color') === 'rgba(0, 0, 0, 0)' ||
window.getComputedStyle(curr).getPropertyValue('background-color') === 'transparent') {
if (curr.parentElement) {
curr = curr.parentElement;
}
}
Expected behavior:
Should check for curr == html and return
If applicable, please provide a codepen repro: