fix: stabilize deselect flow for outside click and next selection#5008
Closed
newstart0514 wants to merge 4 commits intoVisActor:developfrom
Closed
fix: stabilize deselect flow for outside click and next selection#5008newstart0514 wants to merge 4 commits intoVisActor:developfrom
newstart0514 wants to merge 4 commits intoVisActor:developfrom
Conversation
Contributor
Author
|
劳烦不要合并这么快,等待issue复现示例验证 |
Contributor
Author
|
先关闭这个 PR,等待 issue #5006 的稳定复现路径后再提交收敛版修复。 |
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.
🤔 这个分支是...
🔗 相关 issue 连接
fix #5006
💡 问题的背景&解决方案
背景:
用户反馈在部分交互下会出现“清理慢一拍”的现象:第二次选择未清掉第一次残留,第三次才清掉第二次。说明选中状态与边框组件在某些路径可能存在不同步。
解决方案:
本次改动不再使用等价替换(
dealTableSelect()->updateSelectPos(-1, -1)),改为稳定清理策略:StateManager增加clearSelectState(),强制清空ranges/cellPos/selecting/isSelectAll,并执行deleteAllSelectBorder();outsideClickDeselect路径改为调用clearSelectState(true),确保外部点击时旧选区被彻底清空;ranges.length > 0,避免依赖cellPos导致的“上一轮残留延迟到下一轮才清理”。这样可以覆盖“第一次没正常清除”的慢一拍场景,并让清理语义更一致。
📝 Changelog
☑️ 自测
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough