Repository navigation
fix(core): preserve federated input payloads when cloning - #2156
Merged
Merged
Conversation
xile611
approved these changes
Nov 10, 2026
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 This is a ...
🔗 Related issue link
VisActor/VChart#4725
💡 Background and solution
Cloning a pooled root pointer/wheel event without an EventManager throws while building its propagation path. Managed clones also drop Gesture/custom extension fields and replace the original timestamp. This forces delayed consumers such as VChart debounce/throttle callbacks to maintain their own snapshot implementation.
Mouse, pointer and wheel events now share the same cloning implementation: preserve event data and enumerable extension properties, detach the engine-owned coordinates and top-level path arrays, and reset dispatch state. Root events can be cloned without a manager. Targets, native/original events and extension objects retain their identity; this is not a deep clone of consumer-owned payloads.
IFederatedMouseEventexposesclone(), and the accepted-input source documentation explains that async consumers must clone before the listener returns. The synchronous EventManager dispatch path is unchanged.The PR contains only this fix and regression tests, based on develop
abd20c6d0d1a8a67721125a17948ab1fb505830d. VChart dependency updates and removal of its temporary snapshot implementation must follow a VRender release containing this fix.📝 Changelog
Validation
tsconfig.test.jsonsource aliases and rootDir widened topackages; its normal artifact-based check cannot resolve the unbuilt core package in this isolated checkout.git diff --checkpass.src/interface/event.ts: two method-signature-style errors on InputEventSource.on/off and one unused IBounds warning. Compared the same source/rules against develop; no new diagnostics. This is not a clean lint result.Not run: full multi-package Rush tests/build, browser/Electron/mobile acceptance, performance benchmarking or VChart integration against a newly published package. CI and maintainer review remain separate.
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough