Skip to content

Complete direct editing when moving focus outside of the canvas #2327

@ov-developer

Description

@ov-developer

Describe the Bug

If you are editing an element (Task, Label, does not matter) and you click outside the canvas, the editor is stuck in a state somewhere in-between. The internal Shape data is not being updated as you are still in the state of editing, altough it is not visible.

Steps to Reproduce

  • Go to https://demo.bpmn.io/new
  • Create a new diagram
  • Insert a task and start editing its title
  • Click on the "Download as SVG image" button in the bottom toolbar while the editing is still active

You will see that the generated SVG does not have the title that you just entered:

Editing

Image

Downloaded SVG

Image

In our use case we are triggering an auto-save if the diagram changes. We also auto-save if our user closes the editor dialog (via a close button in a header toolbar outside the canvas) and there are changes. But there are no actual changes in the BPMN data as the editing is not being recognized as completed.

Expected Behavior

Update the internal data and close the editing state if the shape / entire canvas loses focus.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions