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(Dropdown): blur virtual DOM with real DOM #693

Merged
merged 2 commits into from
Oct 17, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Oct 17, 2016

Fixes #692

All event handlers are added/removed based on the virtual DOM events. A recent PR blurred the Dropdown node on close (#628) to prevent a re-opening bug on switching browser tabs. It did not also blur the virtual DOM. This circumvented the Dropdown's virtual DOM onBlur event which removes the openOnSpace listener. This created a bug where a Dropdown without focus opens when pressing space anywhere on the page.

This PR blurs the virtual DOM along side blurring the real DOM. It also adds missing tests for these areas.

Lastly, this PR removes logic and tests for the now unreachable state of "closed and focused". The Dropdown is now blurred on close so it is impossible to enter this state and those tests were failing.

@levithomason levithomason merged commit 15e13e1 into master Oct 17, 2016
@levithomason levithomason deleted the fix/dropdown-open-on-space branch October 17, 2016 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dropdown 'openOnSpace' triggered through TextArea
1 participant