OT: context.forceNotSticky
may not be 100% accurate
#4100
Labels
package:engine
resolution:invalid
This issue is invalid (e.g. reports a non-existent bug or a by-design behavior).
type:improvement
This issue reports a possible enhancement of an existing feature.
(Follow-up to ckeditor/ckeditor5-engine#977)
To speed up work on ckeditor/ckeditor5-engine#977 I've implemented
context.forceNotSticky
using some naive assumptions that may fail during selective undo.Reminder:
context.forceNotSticky
disablesMoveOperation#isSticky
property during OT if it is set totrue
. This is needed for undo to work correctly, however, of course, the flag needs to be respected for proper transformation ofMergeDelta
,SplitDelta
andUnwrapDelta
.Right now, stickiness is disabled (
context.forceNotSticky == true
) when the delta that we transform by has been undone or is a delta that undoes another delta:This is a bit naive assumption that I though of when I considered in what cases the stickiness fail. The better way to solve it might be like with
context.insertBefore
. This means that we enable/disable stickiness basing on how the transformed delta was affected by the deltas it was previously transformed by.BTW.
At one point I wanted to remove
isSticky
and move those transformation nuances to deltas special cases but this would require a lot lot more work than implementingcontext.forceNotSticky
to fix#isSticky
support.The text was updated successfully, but these errors were encountered: