On Node edit, input box is not going off on redraw of diagram

Hi,

On clicking over node name, we have kept editable, by applying following configuration

go.TextBlock,
      {
        row: 0,
        font: `${0.875 * REM_VALUE}px Poppins-Medium`,
        editable: true,
        isMultiline: false,
        stretch: go.GraphObject.Horizontal,
        wrap: go.TextBlock.WrapBreakAll,
        overflow: go.TextBlock.OverflowEllipsis,
        verticalAlignment: go.Spot.Bottom,
        stroke: COLOR.DARK_BLUE_GREY,
        minSize: new go.Size(9.25 * REM_VALUE, 1.25 * REM_VALUE),
        maxSize: new go.Size(9.25 * REM_VALUE, 1.25 * REM_VALUE),
      },
      new go.Binding('text', 'node_name').makeTwoWay()

When before clicking anywhere else, if user is redrawing the diagram then the input textarea is still floating over diagram.

Can you please guide me if there is any way to remove it while re-drawing the diagram.

PFB the image redrawn when input text-area is already open:
image

How is the user “redrawing the diagram” without clicking anywhere else?

If the user is invoking some command that modifies the diagram, you could first call either acceptText or doCancel on the Diagram.currentTool if it is an instance of TextEditingTool.

Thanks Walter…