Combo box allows setting an empty value if it already has focus
eriklumme opened this issue · comments
Steps to reproduce
- Add a
vaadin-combo-box
with a few items.
<vaadin-combo-box items='["One", "Two", "Three", "Four"]'>
</vaadin-combo-box>
-
Select an item. Click outside the box so that it loses focus. Select all of the text in the box, delete it, and press enter. The combo box reverts to the last selection.
-
Click inside the box so that it has focus. Select all of the text in the box, delete it, and press enter.
Expected result
The combo box reverts to the last selection.
Actual result
The combo box sets its value to an empty string.
Not sure if this is intended. It works the same if instead of enter after deleting the text, you simply click outside the box. Esc always reverts to the last selection.
Hello @eriklumme ! Thanks for reporting this, could you please copy-paste the issue to the vaadin-combo-box
repo directly: https://github.com/vaadin/vaadin-combo-box/issues