No longer crash editor when selection change occurs within detached lement and during rendering of the editing. #18958
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.
🚀 Summary
No longer crash the editor when a selection change occurs within a detached element and during rendering of the editing.
📌 Related issues
💡 Additional information
Occasionally, such as when removing markers during a focus change, the selection may end up inside a view element whose parent has already been detached from the DOM but is still present in the view DOM mappings. In most cases this is harmless, but if the
selectionchange
event fires before the view is fully synchronized with the DOM converter, some elements in the selection may become orphans.For example:
The
comment
marker has been removed from the view, but it's still present in DOM converter mappings.