How to exclude 'element.updateLabel' in command stack?

when i create start and task the below events fired in command stack.

for task I see the ‘element.updateLabel’ is firing. how do i stop this ?

{command: “shape.create”, context: {…}, id: 1}
{command: “lane.updateRefs”, context: {…}, id: 1}
{command: “shape.append”, context: {…}, id: 1}
{command: “connection.create”, context: {…}, id: 1}
{command: “element.updateLabel”, context: {…}, id: 2}

You cannot do that, cf. my previous comment.

due to that ctrl +z is not working propery for task , when i do the two times ctrl+z then only the task has removed.

because , Internallly it is undoing two actions , in bpmn.demo it is working fine, may i know how to resolve this problem

Please explain what you are trying to do. Feel free to include a code example so we might be able to help you.

I’m implementing the undo , redo functionality, undo, redo is not working for first click of (ctrl +z) for task only, rest of the shapes are working fine with undo , redo

written below 1 line for that .

this.bpmnjs.get('keyboard').bind(document);

assumption why task is not working correctly for first click of ctrl+z:

in stack , there are two commands are fired

{command: “shape.append”, context: {…}, id: 1}
{command: “element.updateLabel ”, context: {…}, id: 2}

Let me know if you need more inputs from my end.
Thank you very much for your support

Would you mind formatting your code for readability?

https://help.github.com/en/articles/creating-and-highlighting-code-blocks

I edited now, can you once check

What changes did you make to the modeler? Did you add anything?

I only did the two things

this.modeler = new Modeler({
 container: '#canvas',
  keyboard: { bindTo: document }
})

Are you sure?

yes , both are for two different Code snippets .

Finally i got the fix for it … :):smile:

the problem occurs in

"bpmn-js": "^3.5.0",

after replacing with the below version it is working properly

"bpmn-js": "^4.0.1",