Skip to content

Conversation

@vaynevayne
Copy link

fix ant-design/ant-design#42924
resolve ant-design/ant-design#42863

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

把onBlur事件 从 inputContainer 移动到popover上

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

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

@vercel
Copy link

vercel bot commented Jun 10, 2023

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
Copy link
Member

zombieJ commented Jun 12, 2023

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

ant-design/ant-design#42924 (comment)

@vaynevayne
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.x Popover 的 onOpenChange 触发的时机存在问题

2 participants