fix(label-editing): complete on popup menu open

This improves the user flow.

Addresses camunda/camunda-modeler#770
This commit is contained in:
Nico Rehwaldt 2018-04-12 16:17:06 +02:00 committed by Philipp Fromme
parent 68f85a171d
commit 16a7ab2879
2 changed files with 10 additions and 3 deletions

View File

@ -8,6 +8,7 @@ ___Note:__ Yet to be released changes appear here._
* `FEAT`: add initial snapping when creating associations
* `FIX`: allow message flows between collapsed pools
* `FIX`: complete direct editing on popup menu use
## 1.1.1

View File

@ -35,14 +35,20 @@ export default function LabelEditingProvider(
'element.mousedown',
'drag.init',
'canvas.viewbox.changing',
'autoPlace'
'autoPlace',
'popupMenu.open'
], function(event) {
directEditing.complete();
if (directEditing.isActive()) {
directEditing.complete();
}
});
// cancel on command stack changes
eventBus.on([ 'commandStack.changed' ], function(e) {
directEditing.cancel();
if (directEditing.isActive()) {
directEditing.cancel();
}
});