-
Notifications
You must be signed in to change notification settings - Fork 826
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
[EuiOverlayMask] Fix document is undefined #5422
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
💚 CLA has been signed |
Hi @jeepers3327 👋🏽 , Thank you for opening this PR to fix the issue #4807. Could you please sign the Contributor Agreement so we can review your PR? |
Hello @miukimiu , I've already signed the Contributor Agreement. Thanks. |
Thanks @jeepers3327. One of ours engineers will do the review. 🎉 In the meantime, can you go through the PR checklist? For example, a changelog entry is missing. 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does cover cases where EuiOverlayMask is hidden to start, but there is still a document
error if the component is shown to start:
The node creation point needs to be adjusted, as well. It may need to be moved inside the useEffect
in cases where SSR is used:
const overlayMaskNode = useRef<HTMLDivElement>(document.createElement('div')); |
This comment has been minimized.
This comment has been minimized.
I fixed the issue by setting the |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5422/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ready to merge after the changelog update and the one suggestion below
I've applied the suggested code and move the changelog entry on the top portion of the document. Just a question, do I have to added any dependencies in
This wasn't present during my PR and commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question, do I have to added any dependencies
Try running yarn install
if you haven't in a couple days
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_5422/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Summary
This fixes #4807 which causes
ReferenceError: document is not defined
error. The code that I add is to check whether the document is defined before appending the overlay mask component to the document body.Checklist