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

[Dropdown] When clicking focusable element outside dropdown to close, don't return focus to trigger #4064

Closed
macandcheese opened this issue Feb 5, 2022 · 4 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request.

Comments

@macandcheese
Copy link
Contributor

macandcheese commented Feb 5, 2022

Description

There's a bit of a weird interaction (imo) when you click outside a dropdown to close it and that click occurs on a focusable element.

The component returns focus to the trigger element:

Screen.Recording.2022-02-05.at.11.41.13.AM.mov

This makes sense when the click occurs on a non-focusable element (or 'esc' key hit). But currently it doesn't allow focus to be set on the intended element. In the above, I'd expect focus to remain on the "share" action or the input when interacted with while the dropdown is open)

cc @asangma @driskull @jcfranco - thoughts on this interaction?

Acceptance Criteria

When clicking outside a dropdown to close, if the click occurs on a focusable element, do not return focus to the dropdown trigger, and instead allow focus on the interacted with element. Retain current functionality when the click occurs on a non-focusable element.

Relevant Info

No response

Which Component

Dropdown

Example Use Case

No response

@macandcheese macandcheese added enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Feb 5, 2022
@jcfranco
Copy link
Member

jcfranco commented Feb 7, 2022

#4010 should fix this (specifically 915cc27). I had to change it since it was failing expectations from the test helper.

@jcfranco
Copy link
Member

@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Mar 14, 2022
@jcfranco jcfranco added this to the Sprint 02/28 - 03/11 milestone Mar 14, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@benelan
Copy link
Member

benelan commented Mar 16, 2022

Verified using Franco's sample!

@benelan benelan closed this as completed Mar 16, 2022
@benelan benelan added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants