Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky component loops forever if background-color is not set for page #3776

Closed
trsvax opened this issue Jan 23, 2018 · 0 comments · Fixed by #3833
Closed

Sticky component loops forever if background-color is not set for page #3776

trsvax opened this issue Jan 23, 2018 · 0 comments · Fixed by #3833
Assignees

Comments

@trsvax
Copy link

trsvax commented Jan 23, 2018

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:

oengusmacinog-zz pushed a commit that referenced this issue Jan 31, 2018
…-color is not set for page (#3833)

Added return default when reaching the html tag in while loop inside _getBackground() inside Sticky component and added color prop that falls back to getBackground function, and added Sticky to ScrollablePane's property table
gokunymbus added a commit that referenced this issue Feb 1, 2018
…ckground-color is not set for page (#3833)"

This reverts commit ddc5440.
gokunymbus added a commit that referenced this issue Feb 1, 2018
* Revert "Updating config files in @uifabric/icons package (#3851)"

This reverts commit 952ad79.

* Revert "Addressing Issue #3776 - Sticky component loops forever if background-color is not set for page (#3833)"

This reverts commit ddc5440.

* Revert "Fix issue in modal Selection handling (#3836)"

This reverts commit c304b01.

* Revert "Adding new WOFF files to the @uifabric/icons/fonts folder (#3848)"

This reverts commit 66a91aa.

* Revert "Controlled TextFields (#3796)"

This reverts commit b17a45f.
chrismohr pushed a commit to chrismohr/office-ui-fabric-react that referenced this issue Apr 17, 2018
…ackground-color is not set for page (microsoft#3833)

Added return default when reaching the html tag in while loop inside _getBackground() inside Sticky component and added color prop that falls back to getBackground function, and added Sticky to ScrollablePane's property table
chrismohr pushed a commit to chrismohr/office-ui-fabric-react that referenced this issue Apr 17, 2018
* Revert "Updating config files in @uifabric/icons package (microsoft#3851)"

This reverts commit 952ad79.

* Revert "Addressing Issue microsoft#3776 - Sticky component loops forever if background-color is not set for page (microsoft#3833)"

This reverts commit ddc5440.

* Revert "Fix issue in modal Selection handling (microsoft#3836)"

This reverts commit c304b01.

* Revert "Adding new WOFF files to the @uifabric/icons/fonts folder (microsoft#3848)"

This reverts commit 66a91aa.

* Revert "Controlled TextFields (microsoft#3796)"

This reverts commit b17a45f.
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants