SetFocus in combox

I am trying to put a setFocus in Combox, using javascript, but I can't get it just working for an input

when I click enter on data it doesn’t direct the focus to the sex input

I think that with combox it doesn't work

Hi Fabiano,

The shared JS implementation works fine but what's missing here is the dropdown :focus pseudo-class CSS definition.

Define the below-mentioned CSS rule in the module/screen level theme section.

[data-dropdown] > select.dropdown-display:focus {
     border: var(--border-size-s) solid var(--color-primary);

See this sample screen (After clicking the Set focus on Dropdown button > press the spacebar key, the dropdown options will be displayed)

Hope this helps you!

Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.