react-component / select

React Select
https://select.react-component.now.sh/
MIT License
892 stars 452 forks source link

fix(onBlur): suppress close popover onBlur #951

Open vaynevayne opened 1 year ago

vaynevayne commented 1 year ago

fix https://github.com/ant-design/ant-design/issues/42924 resolve https://github.com/ant-design/ant-design/discussions/42863

https://stackblitz.com/edit/react-djm2de?file=index.tsx

把onBlur事件 从 inputContainer 移动到popover上

解决的问题: 原先, 当点击按钮,弹窗打开时,popover就会意外关闭, 修复后: 当点击按钮,弹窗打开时,popover不会意外关闭

但是想要彻底解决问题, 还需要最后一步, modal组件的dialog容器onClick时 阻止事件冒泡, 这样应该不会触发popover上的onBlur

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
select ❌ Failed (Inspect) Jun 10, 2023 0:21am
zombieJ commented 1 year ago

这两个组件没有关系,Popover 没用到 Select 代码。

https://github.com/ant-design/ant-design/issues/42924#issuecomment-1586721548

vaynevayne commented 1 year ago

你看文件改动, 这个改动跟其他库没任何关系