Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Fix logout dropdown hide on outside click #565

Merged
merged 3 commits into from
Jul 24, 2020
Merged

Conversation

sanjiv-saini
Copy link

@sanjiv-saini sanjiv-saini commented Jul 24, 2020

#45

@callmekatootie
Copy link
Collaborator

Before fix:

image

After fix:

image

There's a bolder outline...

Copy link
Collaborator

@callmekatootie callmekatootie left a comment

Choose a reason for hiding this comment

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

@sanjiv-saini
Copy link
Author

sanjiv-saini commented Jul 24, 2020

That is because, earlier that dropdown was not getting focused, thats the behaviour of focus. It will work in accessibility behaviour as well, like going through tab hitting tab will focus the dropdown itself. @callmekatootie

@callmekatootie
Copy link
Collaborator

That is because, earlier that dropdown was not getting focused, thats the behaviour of focus. It will work in accessibility behaviour as well, like going through tab hitting tab will focus the dropdown itself.

Ok. But we are not expecting any focus to happen - the expectation is that the dropdown closes when clicked outside. It should not have any side effects

@sanjiv-saini
Copy link
Author

sanjiv-saini commented Jul 24, 2020

This is the only clean solution I found. others require event on top document, and may not work always. @callmekatootie . Here the side effect is in the correct way. Because what you asking is when ever user focus goes out of that dropdown, it should close. thats the behaviour it is doing. Earlier that was not the case.

@callmekatootie
Copy link
Collaborator

I see. Could we then disable the outline using CSS when the element is in focus...

@sanjiv-saini
Copy link
Author

ok, I will update the css.

@callmekatootie
Copy link
Collaborator

@sanju-singh Is this ready for review again... (If so, remove the Feedback label to get my attention 😊 )

@sanjiv-saini
Copy link
Author

@callmekatootie , yes, I updated in issue, forgot to update here. Thanks

@callmekatootie callmekatootie merged commit d016f31 into develop Jul 24, 2020
@callmekatootie callmekatootie deleted the issue-45-fix branch July 24, 2020 14:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants