question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[DMN] Overriding handler for `element.updateProperties`

See original GitHub issue

Describe the Bug

On a branch with dmn-js@8.0.0-alpha.1, I am not able to switch from DRD view to Decision Table or Literal Expression. It seems that we reuse the Command Stack object in Modeler. I could not reproduce it on bare dmn-js.

[/Users/maciej/workspace/bpmn-io/dmn-js/packages/dmn-js/test/spec/diagram.dmn] overriding handler for command <element.updateProperties>
    at o._setHandler (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:501:10)
    at _setHandler (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:268:7)
    at register (webpack:///node_modules/diagram-js/lib/command/CommandStack.js:286:7)
    at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528369
    at iterator (webpack:///node_modules/min-dash/dist/index.esm.js:166:19)
    at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528349
    at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/6.6.js:8:528393
    at file:///Users/maciej/workspace/bpmn-io/camunda-modeler/dist/mac/Camunda%20Modeler.app/Contents/Resources/app.asar/public/2.2.js:1:45959
    at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:366:33)
    at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:351:23) [ error ]

Steps to Reproduce

  1. git checkout dmn-1-3-experiments
  2. Open DMN diagram
  3. Try to switch view to Decision Table or Literal Expression

When doing (3) via Drill Down, there will be only an error in the log and nothing else. Switching via tab links crashes the tab.

Expected Behavior

It should work.

Environment

  • OS: MacOS 10.15.2
  • Camunda Modeler Version: this branch

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
nikkucommented, Feb 14, 2020

Please investigate this one further. Both editors are instantiated separaterly via didi and ment to be entirely independent. So any re-use is essentially a bug.

0reactions
barmaccommented, Mar 24, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Path definition - Forum - bpmn.io
helper/ElementHelper'); /** * A handler capable of creating a new element under a provided parent * and updating / creating a reference to...
Read more >
Override a delegated event handler for a specific element only ...
To override existing handler you can do so by extracting the handler that was already assigned then turn off handlers for all spans...
Read more >
Overriding Handlers
This option allows multiple overriding handlers to coexist. In other words, this option is considered a non-exclusive override.
Read more >
Override or set property to React element - DEV Community ‍ ‍
That is all there is to it really. The cloned element will have all the same props but a new click handler. And...
Read more >
JavaScript HTML DOM EventListener - W3Schools
The addEventListener() method attaches an event handler to an element without overwriting existing event handlers. You can add many event handlers to one ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found