Skip to content

Conversation

@skvale
Copy link
Contributor

@skvale skvale commented Jan 29, 2020

Description

When a script tag containing fundamental react was included in the <head> of the document it was throwing an error.

It looks like this was happening because the version of react-overlays that fundamental-react is using in the Popover depends on document.body.appendChild to calculate the scrollbar width from the ModalManager's constructor.

This change ensures that the calculation for document.body.appendChild will only happen when it is available.

@skvale skvale self-assigned this Jan 29, 2020
@netlify
Copy link

netlify bot commented Jan 29, 2020

Deploy preview for fundamental-react ready!

Built with commit 896f83c

https://deploy-preview-859--fundamental-react.netlify.com

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find! Looks good. 🚢

@skvale skvale changed the title fix: create modal manager on demand as a singleton fix: create modal manager, for Popover, on demand as a singleton Jan 29, 2020
@skvale skvale merged commit 7050554 into master Jan 29, 2020
@skvale skvale deleted the fix/instantiate-modal-manager-when-needed branch January 29, 2020 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants