Describe the Bug
Users might not expect commands to be executed during export and listen to commandStack.changed
to call #saveXML
which can lead to an unexpected infinite loop.
Example: https://codesandbox.io/s/align-to-origin-bug-hmklo?file=/src/index.js
Steps to Reproduce
- Listen to
commandStack.changed
to call #saveXML
- Trigger a command stack change
- Infinite loop
Expected Behavior
Either align to origin without the need for a command or somehow make it easier to avoid an unexpected infinite loop (e.g. by defaulting to alignOnSave: false
.
Environment