hooks
hooks copied to clipboard
fix(useClickAway): callback shouldn't be invoked when a dynamic element inside target is clicked
🤔 This is a ...
- [ ] New feature
- [x] Bug fix
- [ ] Site / documentation update
- [ ] Demo update
- [ ] TypeScript definition update
- [ ] Bundle size optimization
- [ ] Performance optimization
- [ ] Enhancement feature
- [ ] Internationalization
- [ ] Refactoring
- [ ] Code style optimization
- [ ] Test Case
- [ ] Branch merge
- [ ] Other (about what?)
🔗 Related issue link
fix: https://github.com/alibaba/hooks/issues/2321
💡 Background and solution
📝 Changelog
| Language | Changelog |
|---|---|
| 🇺🇸 English | fix(useClickAway): callback shouldn't be invoked when a dynamic element inside target is clicked |
| 🇨🇳 Chinese | fix(useClickAway): 点击目标元素内部的动态元素时,不应该调用回调 |
☑️ Self Check before Merge
⚠️ Please check all items below before review. ⚠️
- [x] Doc is updated/provided or not needed
- [x] Demo is updated/provided or not needed
- [x] TypeScript definition is updated/provided or not needed
- [x] Changelog is provided or not needed
这个 PR 的变动单测模拟不出来,按照 https://github.com/alibaba/hooks/issues/2321#issue-1892386450 的 demo,人工是可以复现出问题,并且这个 PR 确实能解决问题,但是单测里复现不了,所以就没补单测