-
Notifications
You must be signed in to change notification settings - Fork 254
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(ui5-multi-combobox): close popover & empty value on selection #832
Conversation
if you focus the checkbox and press Enter I am not sure if this is count for using checkbox
Fixes #768 |
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.
Let`s add two basic tests, covering at least some of the logic
(1) focus on item and press Enter (selected, but multi closes)
(2) focus on item and press Space (selected, but multi remains open)
packages/main/src/MultiComboBox.js
Outdated
@@ -402,6 +404,12 @@ class MultiComboBox extends UI5Element { | |||
}); | |||
|
|||
this.fireEvent("selectionChange", { items: this._getSelectedItems() }); | |||
|
|||
if (isEnter(event.detail) || (!event.detail.selectionComponentPressed && !isSpace(event.detail))) { |
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.
I think you can remove the isEnter(event.detail) check, when the checkbox is on focus and Enter is pressed, selectionComponentPressed would be still false
and both conditions would be true:
isEnter(event.detail) - > true
!event.detail.selectionComponentPressed && !isSpace(event.detail)) - true
Let`s assume that pressing Enter on the Item or on the checkbox is the same for simplicity
No description provided.