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

[ButtonBase] Update focusVisible ponyfill for shadowRoots #13483

Merged
merged 3 commits into from
Nov 2, 2018

Conversation

JaiPe
Copy link
Contributor

@JaiPe JaiPe commented Nov 1, 2018

The focusVisible polyfill for ButtonBase components was not resolving
targets inside a shadowRoot. Now the activeElement for nested
shadowRoots is resolved to add focus visible classes to targets in the
shadow DOM.

Closes #13447

The focusVisible polyfill for ButtonBase components was not resolving
targets inside a shadowRoot. Now the activeElement for nested
shadowRoots is resolved to add focus visible classes to targets in the
shadow DOM.

Closes mui#13447
@oliviertassinari oliviertassinari added the component: ButtonBase The React component. label Nov 1, 2018
@oliviertassinari oliviertassinari changed the title [ButtonBase] Update focusVisible polyfill for shadowRoots (#13447) [ButtonBase] Update focusVisible ponyfill for shadowRoots Nov 1, 2018
@oliviertassinari oliviertassinari added the new feature New feature or request label Nov 1, 2018
@JaiPe
Copy link
Contributor Author

JaiPe commented Nov 1, 2018

This is proving slightly painful to test cross-browser without polyfilling the shadow DOM api in the test environments - and I don't want the test to turn into an if else monster.

@JaiPe JaiPe force-pushed the focus-visible-patch branch 2 times, most recently from 94f4a7f to e9f3d36 Compare November 1, 2018 15:47
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 1, 2018

This is proving slightly painful to test cross-browser without polyfilling the shadow DOM api in the test environments - and I don't want the test to turn into an if else monster.

@JaiPe The best option is probably to only run the test where the shadow DOM API is available. If it's too much a pain, we can only run it on a simulation server side.

/jsdom/.test(window.navigator.userAgent)

@oliviertassinari
Copy link
Member

Looking at the build error, I believe you are almost good :).

@JaiPe JaiPe force-pushed the focus-visible-patch branch from e9f3d36 to 73c6084 Compare November 1, 2018 16:06
@JaiPe JaiPe force-pushed the focus-visible-patch branch from 73c6084 to 0c1cdfb Compare November 1, 2018 16:47
@oliviertassinari oliviertassinari merged commit 3b79b42 into mui:master Nov 2, 2018
@eps1lon
Copy link
Member

eps1lon commented Nov 2, 2018

@JaiPe You currently don't have you git client linked to you github account. Your contributions won't be linked to your account. See https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/#you-havent-added-your-local-git-commit-email-to-your-profile

@oliviertassinari
Copy link
Member

@JaiPe It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!

@JaiPe JaiPe deleted the focus-visible-patch branch November 2, 2018 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: ButtonBase The React component. new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants