Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(dropdown): avoid focus toggle element after dropdown is closed #6414

Closed
wants to merge 1 commit into from

Conversation

alexmaze
Copy link
Contributor

This PR fixed a bug:

As you can see in this code, it will call "closeDropdown" every time a click event:
image
Add I added the selection code for this function to avoid useless call:
image

As you can see in line 108, it will always focus on the toggle element whenever you click if we do not check the open status.

Thanks,
Alex

@wesleycho
Copy link
Contributor

I didn't understand this when I first looked at this, but the explanation is very good - thank you for this PR, this does sound like a good fix.

@wesleycho wesleycho closed this in 761db7b Jan 23, 2017
@wesleycho wesleycho added this to the 2.5.0 milestone Jan 23, 2017
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.

None yet

2 participants