You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are (at least) two cases when spaces are not correctly from view text nodes to dom text nodes after a change.
Those errors are caused by the fact, that during re-render only the changed dom text node is updated. ckeditor/ckeditor5-engine#1083 changes the way spaces are converter to . Now, changing to bases on the data of the previous text node. This means that whenever a text node is changed, next touching text node has to be re-rendered, etc.
Mentioned cases:
Case 1:
DOM is <p>x<strong> y</strong></p>.
Type space after x.
DOM becomes <p>x <strong> y</strong></p>.
Only one space is rendered.
Case 2:
DOM is <p><strong> y</strong></p>.
Put caret before and turn off bold.
Type x.
DOM becomes <p>x<strong> y</strong></p>.
Incorrect stays in DOM.
We know that there is a "bug" in DomConverter.viewChildrenToDom. View elements mapped to DOM elements are not re-rendered. Those elements might have text nodes that need refreshing and this is the moment when the bug occurs. Unfortunately if we want to change viewChildrenToDom behavior, we will do a bit more processing. Hopefuly, this won't have negative impact on editor.
Yes, there should be branch pushed with proposed changes, but I'll have to take a look at it as it was week or more time ago and there are couple related tickets.
There are (at least) two cases when spaces are not correctly from view text nodes to dom text nodes after a change.
Those errors are caused by the fact, that during re-render only the changed dom text node is updated. ckeditor/ckeditor5-engine#1083 changes the way spaces are converter to
. Now, changing to
bases on the data of the previous text node. This means that whenever a text node is changed, next touching text node has to be re-rendered, etc.Mentioned cases:
Case 1:
<p>x<strong> y</strong></p>
.x
.<p>x <strong> y</strong></p>
.Case 2:
<p><strong> y</strong></p>
.
and turn off bold.x
.<p>x<strong> y</strong></p>
.
stays in DOM.We know that there is a "bug" in
DomConverter.viewChildrenToDom
. View elements mapped to DOM elements are not re-rendered. Those elements might have text nodes that need refreshing and this is the moment when the bug occurs. Unfortunately if we want to changeviewChildrenToDom
behavior, we will do a bit more processing. Hopefuly, this won't have negative impact on editor.PS.
@Reinmar told me to hide those tests in case we need them: https://gist.github.com/scofalik/7d33adb45b82722bf5f6ca59ae8439d8
The text was updated successfully, but these errors were encountered: