Menu blurs when opening an HTML select on Chrome
downshiftversion: 3.3.5nodeversion: 10.16.3npm(oryarn) version: yarn 1.19.1
Relevant code or config
<Downshift>
{({
isOpen,
getToggleButtonProps,
getMenuProps,
}) => (
<div>
<button {...getToggleButtonProps()}>Open</button>
{isOpen && (
<div {...getMenuProps()>
<select>
<option value="test">Test</option>
</select>
</div>
)}
</div>
)}
</Downshift>
What you did:
Set up a downshift dropdown menu that contains, among other things, a select element. Opened up the dropdown menu, clicked on the select element.
What happened:
This triggered the dropdown menu to blur.
Reproduction repository:
Problem description:
I don't expect the menu to blur there on Chrome. It works as expected on Firefox.
Suggested solution:
Not sure if I'm missing props to add to the select menu. I looked through the render props documentation and I didn't see anything specific to select. getInputProps isn't compatible with select elements. Ideally it works as expected out of the box, or there is a getSelectProps render prop.
Do you have a code sandbox to show this issue?
Can you stop the click event from propagating when clicking the select?