-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
feat(Dropdown): close on blur #467
feat(Dropdown): close on blur #467
Conversation
Current coverage is 98.31% (diff: 100%)@@ master #467 diff @@
==========================================
Files 98 98
Lines 1421 1426 +5
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 1397 1402 +5
Misses 24 24
Partials 0 0
|
@@ -994,6 +1011,7 @@ describe('Dropdown Component', () => { | |||
.simulate('focus') | |||
|
|||
domEvent.keyDown(document, { key: 'ArrowDown' }) | |||
domEvent.keyDown(document, { key: 'ArrowDown' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a duplicate down arrow here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, never mind, I see the close on blur requires another arrow to open.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a comment on 1008 that we should update or remove:
// blur, focus, move item selection down
Since we are now opening after the focus.
Thanks for the solid work. I've left a few requests for adding/updating comments only. Then we're good to merge. |
@levithomason Changed the comments to your requests. |
Released in |
Fixed the TODO that the Dropdown didn't close on blur.
I did not yet make it open on focus (other TODO), since I wanted to ask for your comments on this.
In my opinion that behavior is not always wanted, but it is how vanilla SUI works right now.