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 涉及的模式: 即使渲染模式
Issue 现象:
当选中多行内容,且首行为 noteElement 时,鼠标单击选中区域内的任何位置,都不会取消选中内容。
经查找,是由于在解决 #615 这个 issue 后,引入的此 issue
补充说明:
在解决此问题时,发现不能仅仅在 setSelectionFocus(range); 之前 判断 range.collapsed ,还会有情况导致 展开的 Node 并不是当前点击的 Node
因为当 range.collapsed = false 时, click 事件触发的 event.target 会与 range 不符:
探讨问题: