Addressing Issue #3776 - Sticky component loops forever if background-color is not set for page#3833
Merged
oengusmacinog-zz merged 4 commits intoJan 31, 2018
Conversation
added 2 commits
January 29, 2018 15:40
…_getBackground() inside Sticky component
gokunymbus
suggested changes
Jan 30, 2018
| window.getComputedStyle(curr).getPropertyValue('background-color') === 'transparent') { | ||
| if (curr.tagName === 'HTML') { | ||
| // Fallback color if no element has a declared background-color attribute | ||
| return 'rgba(244, 244, 244, 1)'; |
Contributor
There was a problem hiding this comment.
We should just use return; instead of returning a hard-coded value.
Collaborator
Author
gokunymbus
reviewed
Jan 30, 2018
| this.content = document.createElement('div'); | ||
| this.content.style.background = this._getBackground(); | ||
| this.content.style.background = this._getBackground() || 'rgba(244, 244, 244, 1)'; | ||
| ReactDOM.render(<div>{ this.props.children }</div>, this.content); |
Contributor
There was a problem hiding this comment.
Lets make this value a prop that the consumer can choose.
… Sticky to ScrollablePane's property table
gokunymbus
approved these changes
Jan 31, 2018
gokunymbus
added a commit
that referenced
this pull request
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.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull request checklist
$ npm run changeDescription of changes
added return default when reaching the html tag in while loop inside _getBackground() inside Sticky component
Focus areas to test
N/A