fix: avoid duplicate event handlers after chart remake - #4633
Open
xuefei1313 wants to merge 1 commit into
Open
Conversation
xuefei1313
marked this pull request as ready for review
July 28, 2026 10:00
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
N/A
🔗 Related PR link
N/A
🐞 Bugserver case id
N/A
💡 Background and solution
当
pointerdown用户回调中调用updateSpec,且更新触发图表重建时,VChart 会重复回放已注册的用户事件,因此后续点击会额外触发回调。重建时不再回放仍由 VChart 全局事件实例持有的用户监听;同时释放旧 chart-owned
Event的内部监听,避免 interaction 等模块在重建后重复注册。不会清空共享EventDispatcher,因此不会影响其他模块或用户事件。新增回归测试、chart 事件释放测试,以及 browser 复现页。
📝 Changelog
updateSpecremakes a chartupdateSpec重建图表后用户事件回调重复触发的问题☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough