-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
RootPortal组件内部的点击事件不响应 #13312
Comments
https://developers.weixin.qq.com/miniprogram/dev/component/root-portal.html |
是这样,如果RootPortal外部有View监听onClick事件,RootPortal内部View监听的事件就不响应,如果把外部的VIew的onClick去掉,内部的View监听就可以生效了,不是说内部View onClick要RootPortal外部的View生效 所有操作都点击的是RootPortal内部绑定onClick事件的View,不是点击外部要里面响应 |
taro/packages/taro-runtime/src/dom/event.ts Line 176 in fa5c71c
taro/packages/taro-runtime/src/utils/index.ts Lines 76 to 91 in fa5c71c
因为有祖先元素监听了 |
现在还是会有这个问题,我用原生小程序是没有这个问题,求大佬麻烦看一下 @TheKonka |
…rent node also listening NervJS#13312
相关平台
微信小程序
复现仓库
https://github.com/zhipenglin/taro-root-portal-bug.git
小程序基础库: 2.30.0
使用框架: React
复现步骤
放在RootPortal组件内部的组件,当RootPortal组件外部有onClick事件监听的时候,内部组件的onClick不能正常响应
期望结果
RootPortal组件的内部组件的onClick正常响应
实际结果
RootPortal组件的内部组件的onClick不能正常响应
环境信息
The text was updated successfully, but these errors were encountered: