radix-ui / primitives

Radix Primitives is an open-source UI component library for building high-quality, accessible design systems and web apps. Maintained by @workos.
https://radix-ui.com/primitives
MIT License
15.95k stars 834 forks source link

TypeError: Cannot read properties of null (reading 'focus') #3133

Open wentChu opened 2 months ago

wentChu commented 2 months ago

Bug report

Current Behavior

@radix-ui/react-select position: "popper"

Customize the filter and add input to selectContent. Do not remove the focus during input. It will automatically focus on the item, resulting in an error. image image

Suggested solution

It is recommended to open the switch for automatic focus of selectItem to the public.

Your environment

Software Name(s) Version
Radix Package(s) @radix-ui/react-select ^2.1.1
React n/a ^18.3.1
next.js n/a ^14.2.5
Browser google
Assistive tech
Node n/a v20.12.2
npm/yarn yarn 1.22.19
Operating System macos m1