diff --git a/lib/features/label-editing/LabelEditingProvider.js b/lib/features/label-editing/LabelEditingProvider.js index 698c10bd..54c31cd5 100644 --- a/lib/features/label-editing/LabelEditingProvider.js +++ b/lib/features/label-editing/LabelEditingProvider.js @@ -48,7 +48,8 @@ export default function LabelEditingProvider( 'canvas.viewbox.changing', 'drag.init', 'element.mousedown', - 'popupMenu.open' + 'popupMenu.open', + 'root.set' ], function(event) { if (directEditing.isActive()) { diff --git a/test/spec/features/label-editing/LabelEditing.bpmn b/test/spec/features/label-editing/LabelEditing.bpmn index b6e3de61..2abd9877 100644 --- a/test/spec/features/label-editing/LabelEditing.bpmn +++ b/test/spec/features/label-editing/LabelEditing.bpmn @@ -14,11 +14,12 @@ SubProcess_1 - Task_1 StartEvent_08jn2xd + Task_1 Task_1fo1fvh ExclusiveGateway_1 EndEvent_1 + SubProcess_2 @@ -66,6 +67,7 @@ + @@ -87,6 +89,9 @@ + + + @@ -211,4 +216,7 @@ + + + diff --git a/test/spec/features/label-editing/LabelEditingProviderSpec.js b/test/spec/features/label-editing/LabelEditingProviderSpec.js index f2ad6e6c..e4e26ac8 100644 --- a/test/spec/features/label-editing/LabelEditingProviderSpec.js +++ b/test/spec/features/label-editing/LabelEditingProviderSpec.js @@ -155,6 +155,34 @@ describe('features - label-editing', function() { } )); + + it('should submit on root element changed', inject( + function(elementRegistry, directEditing, canvas, eventBus) { + + // given + var shape = elementRegistry.get('Task_1'), + task = shape.businessObject, + newRoot = elementRegistry.get('SubProcess_2_plane'); + + // activate + eventBus.fire('element.dblclick', { element: shape }); + + var newName = 'new value'; + + // a