You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the sake of accuracy of expression, I will use Chinese next(without google translate).
实际行为: node-event-processor.ts
// Event.AT_TARGET// checks if destroyed in capturing callbacksevent.eventPhase=2;event.currentTarget=owner;if(this.capturingTarget){this.capturingTarget.emit(event.type,event);}if(!event.propagationImmediateStopped&&this.bubblingTarget){this.bubblingTarget.emit(event.type,event);}
Cocos Creator version
3.8.2
System information
MacOS
Issue description
For the sake of accuracy of expression, I will use Chinese next(without google translate).
实际行为:
node-event-processor.ts
在捕获与冒泡阶段,
propagationImmediateStopped
没有任何作用,仅用于阻止不向目标阶段的冒泡监听的事件,甚至在目标阶段的监听事件途中设置的话,也不影响剩余的callbacks
。文档描述:
问题:
现在文档与代码的行为是不一致的,那么,哪个行为是正确的?
然后,事件系统的行为是否应该实现得与 W3C 规范一致?
https://dom.spec.whatwg.org/#stop-immediate-propagation-flag
顺便说句,现在的代码实现太古怪了,propagationImmediateStopped 的作用仅仅是跳过
AT_TARGET
目标阶段,后续依然会进行冒泡。Relevant error log output
No response
Steps to reproduce
.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: