Skip to content

[multi-select-combo-box] Clicking toggle button doesn't focus field #5860

Closed

Description

@juuso-vaadin

Description

Multi-Select Combo Box differs from regular Combo Box in that clicking the dropdown icon (part="toggle-button") doesn't focus the field.

Field is focused when overlay is closed even if no item is selected.

Expected outcome

Clicking anywhere in the component focuses the component.

Minimal reproducible example

https://vaadin.com/docs/latest/example?embed=multi-select-combo-box-basic-wc.js&import=component/multi-select-combo-box/multi-select-combo-box-basic.ts

Steps to reproduce

  1. Click toggle button
  2. Field is not focused

Environment

Vaadin version(s): 23 & 24
OS: Mac

Browsers

Issue is not browser related

Activity

  1. web-padawan commented on May 23, 2023

    @web-padawan
    Member

    Thanks for the issue. Looks like we missed to port some logic from the regular vaadin-combo-box. I will investigate.

  2. self-assigned this
    on May 23, 2023
  3. bwajtr commented on Jun 12, 2023

    @bwajtr
    Contributor

    This problem is actually more general issue of the ComboBoxMixin. The same problem can be reproduced in another components which use ComboBoxMixin. So the issue is reproducible in vaadin-multi-select-combo-box, vaadin-combo-box-light and vaadin-time-picker. However, the issue cannot be reproduced in vaadin-combo-box.

    I've put together a testing page, where you can reproduce the issue on all mentioned components:
    combo-toggle-focus-bug.zip

    Just copy to the /dev directory and open using yarn start

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions