Fixed selection attributes handling after softBreak.#19918
Open
Fixed selection attributes handling after softBreak.#19918
Conversation
Member
Mati365
reviewed
Mar 9, 2026
Comment on lines
+1260
to
+1264
| for ( let node: ModelNode | null = startNode; node; node = getNextNode( node ) ) { | ||
| if ( node.is( 'element', 'softBreak' ) ) { | ||
| crossedSoftBreak = true; | ||
| continue; | ||
| } |
Member
There was a problem hiding this comment.
I'm not sure whether the engine should be aware of the existence of the softBreak element. It's registered in an external plugin. Would a schema flag be better? What do you think?
Member
There was a problem hiding this comment.
We discussed with @niegowski, and it might be good idea to store some info in schema / attribute properties. However, there might be another workaround related to storing attributes on soft-breaks itself. We need to discuss it a little bit more.
Mati365
requested changes
Mar 11, 2026
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.
🚀 Summary
Improved document selection attribute inheritance around
<softBreak>so returning the caret after a soft break restores expected formatting.When selection attributes are recalculated across
<softBreak>, only attributes marked withcopyOnEnterare inherited. Other inline non-object elements still act as hard boundaries.📌 Related issues
💡 Additional information
Optional: Notes on decisions, edge cases, or anything helpful for reviewers.
🧾 Checklists
Use the following checklists to ensure important areas were not overlooked.
This does not apply to feature-branch merges.
If an item is not relevant to this type of change, simply leave it unchecked.
Author checklist
Reviewer checklist
t()(if any).