onBlur never called when parent has been focused
Author: arnauddrainCreated Apr 30, 2026Updated Jun 12, 2026
Labelsissue/bug-unconfirmed
Hi,
When the parent element of a ReactSelect has been focused, the onBlur is never called on ReactSelect, so clicking outside of the component never close the option menu.
It can be reproduced easily with this:
const nodeRef = useRef<HTMLDivElement | null>(null);
<div
ref={nodeRef}
tabIndex={0}
onMouseDown={() => {
nodeRef.current?.focus();
}}
>
<ReactSelect />
</div>Another strange thing is that in this situation, onMenuClose is called when we open the menu for the first time, and it's not the case in regular situations.
Thanks,
Source: JedWatson/react-select