-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Selection position is lost when unwrapping range #3999
Comments
I also get: <messageQuote><heading>a[bc</heading><paragraph>def</paragraph><paragraph>xx</paragraph>]</messageQuote><paragraph>ghi</paragraph> For this content: setModelData(
doc,
'<heading>a[bc</heading>' +
'<paragraph>def</paragraph>' +
'<messageQuote><paragraph>x]x</paragraph></messageQuote>' +
'<paragraph>ghi</paragraph>'
); And this: [<messageQuote><paragraph>abc</paragraph></messageQuote><widget>xx</widget>]<messageQuote><paragraph>def</paragraph></messageQuote> When wrapping both paragraphs separately: <paragraph>a[bc</paragraph><widget>xx</widget><paragraph>de]f</paragraph> |
I pushed t/841 with tests. All red :D |
I feel I'll need this many times, so a snippet for debugging this: import { stringify } from '../dev-utils/model';
result[ 0 ] && console.log( 0, changeType, deltaType, stringify( result[ 0 ].root, result[ 0 ] ) );
result[ 1 ] && console.log( 1, changeType, deltaType, stringify( result[ 1 ].root, result[ 1 ] ) );
result[ 2 ] && console.log( 2, changeType, deltaType, stringify( result[ 2 ].root, result[ 2 ] ) ); |
t/841 contains a potential fix for this issue now, but I'd need to add a few tests in the range itself (e.g. for |
Fix: Fixed a bug where `LiveRange` position would be lost when using wrap and unwrap deltas. Closes #841.
The text was updated successfully, but these errors were encountered: