Move item by arrow keys


is it possible to prevent move item by arrow keys when edit text? events befor/after/shape/item/move not fires when move by arrows ( it’s bug or feature?)

Hello.

Thank you for your report.
The problem was confirmed. We’ll try to fix it in one of the future updates.
I’ll inform you about any progress on this issue.

Hello.

We fixed your reported problem in the latest dhx.Diagram update (v6.0.7).
Now the editor navigation should work correctly.
You can check it here:
https://snippet.dhtmlx.com/lo1vm0e8?mode=wide

Please, download the latest available dhx.Diagram build from your client’s area to get this fix.
Thank you for your report.

How is this activated? I need to get the same behavior on a custom shape, when editing text in it.

Shapes have an undocumented property called $editable. It prevents shapes from being moved while text is being edited. Please do not remove it. Without it, it is impossible to create a custom shape with editable text.

Hello @D_F ,

The $editable is an internal property, and may be not the better approach to work with diagrams.

There is a quite significant amount of API that can be used in order to control shape move operations:
Shape Properties | DHTMLX JavaScript Diagram Docs
beforeShapeMove Event of Editor | DHTMLX JavaScript Diagram Docs
afterShapeMove Event of Editor | DHTMLX JavaScript Diagram Docs
shapeMoveEnd Event of Editor | DHTMLX JavaScript Diagram Docs

Or you can disable shape moving using fixed property:

Also, you can apply different logic during the inline editing event:

Also it may be helpful if you reproduce your current use case(with $editable) in the demo below:
https://snippet.dhtmlx.com/a9t2z2dt?tag=diagram&mode=wide
(open the demo => reproduce your config => click the “Save” button)

Kind regards,