问题:PageView的任意page点击事件不响应,滑动事件要响应 。
-
Creator 版本:3.8.3
-
目标平台: web/android/ios
-
重现方式:根节点添加组件BlockInputEvent,子节点添加依次PageView 和Button、Node三个节点,PageView中给任意page添加一个page_button。根节点PageView,Node大小相等且重合,Button被Node全覆盖。在代码中给Node注入触摸事件,并且不吞噬
this.nodeTest.on(NodeEventType.TOUCH_START, (a:EventTouch,b,c)=>{
a.preventSwallow = true
console.log("------")
}, this)this.nodeTest.on(NodeEventType.TOUCH_MOVE, (a:EventTouch,b,c)=>{ a.preventSwallow = true }, this) this.nodeTest.on(NodeEventType.TOUCH_END, (a:EventTouch,b,c)=>{ a.preventSwallow = true }, this) this.nodeTest.on(NodeEventType.TOUCH_CANCEL, (a:EventTouch,b,c)=>{ a.preventSwallow = true }, this)
则:pageview可以滑动,pagebutton不会响应(被根节点吞噬掉了,如果根节点不加事件,则可正常响应),button可以响应assets.zip (7.0 KB)


