Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Update model selection attributes after each change #1343

Merged
merged 8 commits into from
Mar 8, 2018
Merged

Conversation

szymonkups
Copy link
Contributor

@szymonkups szymonkups commented Mar 7, 2018

Suggested merge commit message (convention)

Fix: model.DocumentSelection should update it's attributes after each change, including external changes. Closes ckeditor/ckeditor5#4258.


Close together with: ckeditor/ckeditor5-undo#83 and ckeditor/ckeditor5-autoformat#52.

@szymonkups szymonkups requested a review from scofalik March 7, 2018 09:14
@coveralls
Copy link

coveralls commented Mar 7, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling d90354f on t/1267 into 3ea70f3 on master.

const differ = model.document.differ;

for ( const entry of differ.getChanges() ) {
if ( entry.type != 'insert' || !entry.position.parent ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!entry.position.parent - is there any situation when this happens? 🤔

scofalik added a commit to ckeditor/ckeditor5-autoformat that referenced this pull request Mar 8, 2018
Internal: Align to changes made in DocumentSelection. See ckeditor/ckeditor5-engine#1343.
scofalik added a commit to ckeditor/ckeditor5-undo that referenced this pull request Mar 8, 2018
Internal: Align to changes made in DocumentSelection. See ckeditor/ckeditor5-engine#1343.
@scofalik scofalik merged commit b91d967 into master Mar 8, 2018
@scofalik scofalik deleted the t/1267 branch March 8, 2018 13:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants