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

Close dropdown when clicking on select #211 #241

Merged
merged 1 commit into from
Jun 10, 2015
Merged

Close dropdown when clicking on select #211 #241

merged 1 commit into from
Jun 10, 2015

Conversation

nkbt
Copy link
Contributor

@nkbt nkbt commented Jun 10, 2015

Clicking on the select itself should not close menu (only focus cursor inside the input), here is a solution - click on arrow should close menu.

The only issue is - arrow is too small, so invisible .Select-arrow-zone element was added under it. You don't have to be a sniper to click on the arrow anymore.

Clicking on .Select-clear did not prevent default action and because it goes slightly over arrow, menu was also closed, so I added stopPropagation() and preventDefault for it.

@JedWatson
Copy link
Owner

Looks good @nkbt, thanks!

JedWatson added a commit that referenced this pull request Jun 10, 2015
 Close dropdown when clicking on select #211
@JedWatson JedWatson merged commit 641c58d into JedWatson:master Jun 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants