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

T/629 Fix infinite selection change loop #668

Closed
wants to merge 8 commits into from
Closed

T/629 Fix infinite selection change loop #668

wants to merge 8 commits into from

Conversation

scofalik
Copy link
Contributor

@scofalik scofalik commented Oct 31, 2016

Fixes ckeditor/ckeditor5#3843.

The problem with selection was that during conversion chain: DOM -> view (1) -> model -> view (2) -> DOM view (1) selection was different than view (2) selection because there was a difference how model -> view and DOM -> view selection is converted. This caused an infinite loop of selection fixing.

I changed one of conditions that was responsible for breaking the loop. The condition looked whether view (1) and view (2) are equal. Now I check whether they are touching. If they are, the selection is not converted any further.

To do so, I needed to implement isTouching in model range, selection and view position, range selection.

@scofalik
Copy link
Contributor Author

scofalik commented Nov 2, 2016

I provided an alternative solution in #671

@Reinmar
Copy link
Member

Reinmar commented Nov 9, 2016

Since we're betting more on #671 I'm closing this.

@Reinmar Reinmar closed this Nov 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix infinite selection change loop introduced in #623
2 participants