vaadin / vaadin-core

Home Page:https://vaadin.com/docs/latest/ds/overview

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Combo box allows setting an empty value if it already has focus

eriklumme opened this issue · comments

Steps to reproduce

  1. Add a vaadin-combo-box with a few items.
<vaadin-combo-box items='["One", "Two", "Three", "Four"]'>
</vaadin-combo-box>
  1. 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.

  2. 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

@limonte Sorry, I have now copied it to the right repo.