diff --git a/platform/containment/src/ComposeActionPolicy.js b/platform/containment/src/ComposeActionPolicy.js index 3468cd3107..fa91cfb0e7 100644 --- a/platform/containment/src/ComposeActionPolicy.js +++ b/platform/containment/src/ComposeActionPolicy.js @@ -55,11 +55,12 @@ define( this.policyService = this.policyService || this.getPolicyService(); // ...and delegate to the composition policy - return this.policyService.allow( - 'composition', - containerType, - selectedType - ); + return containerObject.getId() !== selectedObject.getId() && + this.policyService.allow( + 'composition', + containerType, + selectedType + ); }; /** diff --git a/platform/features/timeline/src/directives/MCTSwimlaneDrop.js b/platform/features/timeline/src/directives/MCTSwimlaneDrop.js index d64f1a7831..cf21ac3105 100644 --- a/platform/features/timeline/src/directives/MCTSwimlaneDrop.js +++ b/platform/features/timeline/src/directives/MCTSwimlaneDrop.js @@ -85,6 +85,7 @@ define( ); if (id) { + event.stopPropagation(); // Delegate the drop to the swimlane itself swimlane.drop(id, (draggedSwimlane || {}).domainObject); } diff --git a/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js b/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js index 80eeb43a74..7a550b32e8 100644 --- a/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js +++ b/platform/features/timeline/test/directives/MCTSwimlaneDropSpec.js @@ -87,7 +87,8 @@ define( testEvent = { pageY: TEST_TOP + TEST_HEIGHT / 10, dataTransfer: { getData: jasmine.createSpy() }, - preventDefault: jasmine.createSpy() + preventDefault: jasmine.createSpy(), + stopPropagation: jasmine.createSpy() }; testEvent.dataTransfer.getData.andReturn('abc');