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

fix: prevent errors with createElement #118

Merged
merged 1 commit into from
May 24, 2021
Merged

Conversation

geoffrich
Copy link
Contributor

Alaska Airlines Pull Request

Fixes #112

Summary:

Initializing the focus-visible polyfill in the constructor was throwing an error when calling document.createElement('auro-button'). This PR moves the polyfill initialization to connectedCallback.

In particular, this was throwing exceptions in unit tests run with JSDOM.

Type of change:

Please delete options that are not relevant.

  • Revision of an existing capability

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

@geoffrich geoffrich added the Status: Review Needed Work is completed, user is requesting feedback label May 24, 2021
@geoffrich geoffrich self-assigned this May 24, 2021
@geoffrich
Copy link
Contributor Author

I verified that this fixes the error thrown in my local Auro/Jest setup without requiring additional test setup in beforeAll.

@blackfalcon blackfalcon merged commit 4c49880 into master May 24, 2021
@blackfalcon blackfalcon deleted the grich/createElement/#112 branch May 24, 2021 23:31
@AuroDesignSystem
Copy link
Collaborator

🎉 This PR is included in version 6.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Completed work has been released Status: Review Needed Work is completed, user is requesting feedback Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auro-button: cannot call document.createElement when focus visible polyfill applied to shadow root
3 participants