RestrictedEditing feature may produce multiple operations with the same base version #11644
Labels
package:restricted-editing
squad:collaboration
Issue to be handled by the Collaboration team.
type:bug
This issue reports a buggy (incorrect) behavior.
Milestone
While working on the #11634, I realized that a few tests break with the new API, mainly because the
Document#version
check has been moved to another place where versions are checked when they are added to the History instead of before being applied.In #11634 (comment) I debugged the issue and came to these conclusions:
applyMarkerOperation()
is called the first time and a new version for the operation is createdensureNewMarkerIsFlat
). As this is not a normal postfixer -model.markers.on( 'update:restrictedEditingException', ensureNewMarkerIsFlat( editor ) );
- theensureNewMarkerIsFlat
is called just after detecting the update of the marker.ensureNewMarkerIsFlat
detects a marker that is not flat and updates it.udpateMarker()
is calledapplyMarkerOperation()
is called the second time and a new version for the operation is created - the same as during the 2. step.The text was updated successfully, but these errors were encountered: