I used to be able to press Tab once to move to the next column, but now I have to press Tab twice for Select field. TextField does not have this problem.
if I select an item from a select field, then:
- The first Tab just focuses the same field again (blue border)
- for example, I select 198 from the list and hit TAB

*Pressing TAB the second time will then move to the next column
- for example, I select 198 from the list and hit TAB
When I navigate to the next column using Tab, everything works as expected if I don’t make a selection — a single Tab moves me to the next column
The table works as follows: the user must first click on a row to select it (which highlights the row), and then click on a specific cell to start editing that field.
Here’s my defineEditor method:
grid.addItemClickListener(e -> {
Entity item = e.getItem();
if (!item.isEditable() || item.isDeleted()) {
return;
}
if (grid.getEditor().isOpen() && !grid.getEditor().save()) {
return;
}
grid.getEditor().editItem(item);
// Try to focus the editor field for the clicked column
if ("columnA".equals(e.getColumn().getKey())) {
columnASelect.focus();
} else if ("columnB".equals(e.getColumn().getKey())) {
columnBSelect.focus();
} else if ("columnC".equals(e.getColumn().getKey())) {
columnCSelect.focus();
}
});
Here’s my createSelect method:
private Select<String> createTableEditorSelect(
Column<Entity> column,
List<String> options,
String defaultValue,
boolean includeEmptyOption,
boolean includeAllOption) {
Select<String> select = new Select<>();
select.setItems(options);
select.setSizeFull();
defaultValue = defaultValue == null ? "" : defaultValue;
select.setValue(defaultValue);
// Value change listener (fires before blur)
select.addValueChangeListener(e -> {
if (selectedEntity != null
&& gridEditor != null
&& gridEditor.getItem() != null
&& gridEditor.getItem().equals(selectedEntity)) {
if (selectedEntity.getId() != null) {
markFieldEdited(selectedEntity, column.getKey(), e, false);
markEntityEdited(selectedEntity);
updateColumnEditorStyle(selectedEntity, column);
}
// Save editor value immediately to avoid losing changes
grid.getEditor().save();
if (!grid.getEditor().isOpen()) {
grid.getEditor().editItem(selectedEntity);
}
updateRowEditorStyle(selectedEntity);
}
});
column.setEditorComponent(select);
return select;
}
Does anyone know what could cause the field to refocus on itself after pressing Tab once?
This didn’t happen in Vaadin 14, so I’m wondering if something changed in newer versions or if there’s something in my setup triggering this behavior.