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

Schema#getLimitElement() will work with multi-ranges selection #1276

Merged
merged 4 commits into from
Feb 9, 2018

Conversation

pomek
Copy link
Member

@pomek pomek commented Feb 5, 2018

Suggested merge commit message (convention)

Fix: Schema#getLimitElement() will return a proper limit element (the root element) if one of the selection's ranges have the root element as the limit element. Closes ckeditor/ckeditor5#4262.

@pomek pomek requested a review from Reinmar February 5, 2018 09:59
@pomek pomek force-pushed the t/1275 branch 2 times, most recently from 5d1f398 to 100a327 Compare February 5, 2018 10:03
@coveralls
Copy link

coveralls commented Feb 5, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling fc5bba0 on t/1275 into b017890 on master.

@Reinmar
Copy link
Member

Reinmar commented Feb 8, 2018

Wouldn't this work:

return element.getCommonAncestor( range.getCommonAncestor(), { includeSelf: true } );

(I added the options param there)

All tests pass.

@pomek
Copy link
Member Author

pomek commented Feb 9, 2018

Thx. Fixed.

@Reinmar Reinmar merged commit 050a415 into master Feb 9, 2018
@Reinmar Reinmar deleted the t/1275 branch February 9, 2018 09:17
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Schema#getLimitElement() does not work for multi-ranges selection
3 participants