-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The undo stack inserts deleted content in the wrong flow nodes #712
Comments
I looked through the commit history to find a point where it is working properly. The bug even occurs in version I was not able to find the root cause for this in a time-boxed manner. However, I created a test case via 0dcd373 that tries to reproduce the issue. Branch: What I found while creating the test case:
This could be an indication that something is going on with handling the keyboard bindings + focusing properly between the modeler and properties panel. I'd need more time to investigate this, so I'd propose to move this to the backlog as it's not a blocker. |
As we are in the context of direct editing, undo should not be handled by bpmn-js at all but perform the native undo/redo on the contenteditable div |
Could this be another one to be fixed by bpmn-io/diagram-js#662? |
I will try it out with your branch (#739), but I am not confident that it will be solved. No actual undo is triggered currently. I suspect it has more to do with focus handling/Event listeners during re-render of the property panel |
I can still reproduce it on #739 |
You'd need to test it against an end-to-end setup scenario: bpmn-io/diagram-js#662 (comment). There are just too many moving parts at the moment 😄 |
Given your analysis I believe we should simply make sure that input (task A) is different from input (task B) (via a If we do that though we'll run into the issue that we don't properly remember (and restore) collapse + expand states. |
I was trying to use the
That makes sense. I'll try it out. |
Yes, however it will have other unwanted side-effects. I.e. caching of state fetched for Task A and making it available for Task B (use-case: custom stateful form elements). I'm fine though to address / investigate this some day in the future. |
Describe the Bug
When you delete a name or id of a flow node in the properties panel, then add a new node and hit undo, the name or id is inserted back again - in the right property, but of the wrong flow node. So, the revert operation is not conducted properly. Also, adding the flow node itself is not reverted. It seems like the undo stacks of the properties panel and bpmn-js clash.
Steps to Reproduce
Or just see the videos.
Bildschirmaufnahme.2022-06-28.um.22.01.23.mov
Bildschirmaufnahme.2022-06-28.um.21.59.22.mov
(Not validated if this also applies to other properties than ids and names).
Expected Behavior
Hitting undo, at first the newly added flow node should be removed, then the name or id should be inserted back again in the original node.
Environment
The text was updated successfully, but these errors were encountered: