Keyboard delete not working even after enabling allowDelete

Hi Team,

I have enabled allowDelete in config.

  1. selecting a node and deleting it is not deleting the node. But if I click on node twice and then press keyboard delete, then node is getting deleted. Are we missing something ?

  2. In some cases, even after multiple clicks on node and then press keyboard delete, node is not getting deleted.

The default value for Diagram.allowDelete is true, so you don’t need to set it to allow users to delete a Part.

I cannot explain why it sometimes works and sometimes not. Do you set Diagram.isReadOnly or Part.deletable at all? How do you modify the model, if at all? Have you overridden the CommandHandler.deleteSelection command method? Have you overridden any other methods?

Thanks @walter . Upon configuring properly, I am able to delete using keyboard delete.

But now we are seeing issue consistently that. Only upon clicking on node twice only we are able to delete… If we click on node only once and press delete, it’s not deleting…

We have custom SelectionChanged event handler. But we didn’t override any logic related to delete…

Does your “ChangedSelection” listener change what is selected? It must not do so, else there may be undefined behavior and confusion.