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(select): handle open click when inside native label #4466

Merged
merged 11 commits into from
Aug 20, 2021

Conversation

chasestarr
Copy link
Collaborator

Description

Fixes bug where Select would not open listbox on click when inside a native label element. For reference, see reporting comment here: #4402 (comment)

Scope

Patch: Bug Fix

@vercel
Copy link

vercel bot commented Aug 17, 2021

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

🔍 Inspect: https://vercel.com/uber-ui-platform/baseweb/87Aavocnn97pjQm6sz84RhEZ8f91
✅ Preview: https://baseweb-git-select-open-native-label-uber-ui-platform.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 17, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ed5395e:

Sandbox Source
Basic usage Configuration

<label htmlFor="searchable-native-label">
Native searchable
<Select
id="searchable-native-label"
Copy link
Member

Choose a reason for hiding this comment

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

Could we include a test that does not specify id and htmlFor attributes? One of the benefits of wrapping form elements in <label> is that the browser automatically wires up the connection. I realize that's not going to work for every complex form component, but it's a valid option for <Select> after the change in #4402.

@UberOpenSourceBot
Copy link
Contributor

Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #4467

Co-authored-by: UberOpenSourceBot <UberOpenSourceBot@users.noreply.github.com>
Copy link
Contributor

@williamernest williamernest left a comment

Choose a reason for hiding this comment

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

Thanks for the quick turnaround!

@UberOpenSourceBot
Copy link
Contributor

Visual changes were detected on this branch. Please review the following PR containing updated snapshots: #4474

Co-authored-by: UberOpenSourceBot <UberOpenSourceBot@users.noreply.github.com>
@chasestarr chasestarr merged commit 29e35f4 into master Aug 20, 2021
@chasestarr chasestarr deleted the select-open-native-label branch August 20, 2021 23:09
@shannonmoeller
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants