fix: complete direct editing on selection changed
Related to https://github.com/camunda/camunda-modeler/issues/2961
This commit is contained in:
parent
9b1096abbc
commit
011f394d05
|
@ -49,7 +49,8 @@ export default function LabelEditingProvider(
|
|||
'drag.init',
|
||||
'element.mousedown',
|
||||
'popupMenu.open',
|
||||
'root.set'
|
||||
'root.set',
|
||||
'selection.changed'
|
||||
], function(event) {
|
||||
|
||||
if (directEditing.isActive()) {
|
||||
|
|
|
@ -127,7 +127,7 @@ describe('features - label-editing', function() {
|
|||
));
|
||||
|
||||
|
||||
it('should submit on root element click', inject(
|
||||
it('should complete on root element click', inject(
|
||||
function(elementRegistry, directEditing, canvas, eventBus) {
|
||||
|
||||
// given
|
||||
|
@ -156,7 +156,7 @@ describe('features - label-editing', function() {
|
|||
));
|
||||
|
||||
|
||||
it('should submit on root element changed', inject(
|
||||
it('should complete on root element changed', inject(
|
||||
function(elementRegistry, directEditing, canvas, eventBus) {
|
||||
|
||||
// given
|
||||
|
@ -183,6 +183,26 @@ describe('features - label-editing', function() {
|
|||
}
|
||||
));
|
||||
|
||||
|
||||
it('should complete on selection changed', inject(
|
||||
function(elementRegistry, directEditing, selection) {
|
||||
|
||||
// given
|
||||
var shape = elementRegistry.get('Task_1'),
|
||||
task = shape.businessObject;
|
||||
|
||||
directEditing.activate(shape);
|
||||
|
||||
directEditing._textbox.content.textContent = 'FOO BAR';
|
||||
|
||||
// when
|
||||
selection.select();
|
||||
|
||||
// then
|
||||
expect(task.name).to.equal('FOO BAR');
|
||||
}
|
||||
));
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue