-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix infinite selection change loop introduced in #623 #3843
Comments
At this moment I cannot reproduce the situation that inf-loop kicks in when selection is placed at the boundary of inline element. It does occur, however, when you bold a part of text, so I will investigate that. |
Okay I know the cause: DOM selection: |
Okay I analyzed how exactly the selection process looks like: Let me explain a bit:
So I see multiple things that could be changed.
|
I like third solution most because it is least invasive. If we "repair" view selection, then model selection change will make it "wrong" again. |
Because the native event is asyc, so it is fired after observer is reenabled.
The whole idea about the selection attributes is that it matters if the selection is in the |
But selection attributes are important only in the case of the collapsed selection. It case of the non-collapsed selection we could check whether they are similar or touching. It what renderer/observers should do: accept irrelevant differences between view and DOM and do not rerender/fire events. |
Fixed by ckeditor/ckeditor5-engine#671. |
We agreed to merge ckeditor/ckeditor5-engine#623 with a small regression – the infinite loop check kicks in when moving selection over boundaries of inline elements. It needs to be fixed ASAP.
This is a broader issue, though, and includes also:
It's a bit unclear now whether all of them are caused by the same issue or they are separate. In this ticket we must focus on the regression (if it's regression at all). But perhaps, at the same time we'll fix also the rest.
The text was updated successfully, but these errors were encountered: