BeforeEditEnd event firing infinite times on false grid return

Hello, I’m working with the grid’s beforeEditEnd event, to validate some values. I noticed that when throwing a false return to cancel the closing of the edit column, the event is in an infinite loop, as if it was opening and closing the edit over and over again.

The example can be reproduced here https://snippet.dhtmlx.com/b8pr80h8

Edit any field and set a value less than 0.

How do I make the field edit remain open when returning false?

Edit: Doing more testing, I realized that the problem occurs best through key navigation, closing the edit via the enter key. If you click with the mouse on another grid cell, it fires a few times, but quickly the event is cancelled.

Thank you for your attention.

The cause of the porblem is the alert, as in case of opening the alert box you move the focus out of the input, and return back after its closing. This additional blurring causing the additional editor closing and occurring the event once again. Please, try to replace the alert with the console.log, or with the actual needed logic to prevent that loop:
https://snippet.dhtmlx.com/ragyfaci