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(button): respect focus handler props #2976

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

sandgraham
Copy link
Contributor

Originally I was going to update the Popover "hover" trigger to also
trigger on focus events. Reading through our docs, I noticed that we
already have this feature (under the Accessibility section). Sure
enough, we already pass through the focus events to the anchor (or
wrapping span).

The issue is that Button overwrites any onFocus and onBlur handlers
passed as top level props. It respects overrides for those props but
technically people can pass onFocus and onBlur as top level props
so this commit updates the handlers to restore that option.

Originally I was going to update the Popover "hover" trigger to also
trigger on focus events. Reading through our docs, I noticed that we
already have this feature (under the Accessibility section). Sure
enough, we already pass through the focus events to the anchor (or
wrapping span).

The issue is that Button overwrites any `onFocus` and `onBlur` handlers
passed as top level props. It respects overrides for those props but
technically people can pass `onFocus` and `onBlur` as top level props
so this commit updates the handlers to restore that option.
@vercel
Copy link

Vercel bot commented Mar 4, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/uber-ui-platform/baseweb/jbsfioycw
✅ Preview: https://baseweb-git-fix-button-focus-for-popover.uber-ui-platform.now.sh

@sandgraham sandgraham merged commit 9f0949d into master Mar 4, 2020
@uber-baseweb-probots uber-baseweb-probots bot deleted the fix-button-focus-for-popover branch March 4, 2020 19:40
cbranch101 pushed a commit to cbranch101/baseweb that referenced this pull request Mar 26, 2020
Originally I was going to update the Popover "hover" trigger to also
trigger on focus events. Reading through our docs, I noticed that we
already have this feature (under the Accessibility section). Sure
enough, we already pass through the focus events to the anchor (or
wrapping span).

The issue is that Button overwrites any `onFocus` and `onBlur` handlers
passed as top level props. It respects overrides for those props but
technically people can pass `onFocus` and `onBlur` as top level props
so this commit updates the handlers to restore that option.
VladimirMilenko pushed a commit to VladimirMilenko/baseui that referenced this pull request Apr 2, 2020
Originally I was going to update the Popover "hover" trigger to also
trigger on focus events. Reading through our docs, I noticed that we
already have this feature (under the Accessibility section). Sure
enough, we already pass through the focus events to the anchor (or
wrapping span).

The issue is that Button overwrites any `onFocus` and `onBlur` handlers
passed as top level props. It respects overrides for those props but
technically people can pass `onFocus` and `onBlur` as top level props
so this commit updates the handlers to restore that option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants