-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(useClickAway): supports triggering callback by events outside the shadow dom #2190
base: master
Are you sure you want to change the base?
Conversation
|
这个 PR 存在的问题: 注:以 demo6 举例说明
原逻辑(mode: open/closed,原逻辑两个 mode 效果一样):
预期效果:
这个 PR 离预期效果还有差距,后续我会跟进修复。 此外,预期效果中,对于 mode: open 的 Shadow DOM,点击 document 会使得计数+1,与原逻辑不同,是一个破坏性更改,要放到 v4 来做。。。 |
对于 mode: closed 有些用例好像不太能行的 |
是可能无法实现,还是我写的用例逻辑有问题呢? 我看了下,这个 PR 之前,mode: closed 的行为是和我写的预期效果一致的,所以应该不是能不能实现的问题 |
我没记错的话 |
是的,拿不到。对哦,之前不是用 composedPath 实现的,所以,我写的 mode: closed 用例之前是好的,用了 composedPath 来实现估计就不行了。 那再看看吧,尽量按着这个用例来 |
demo 不是只有 mode: open 的吗? |
我手动改的 demo,测试的之前的效果 |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge