JS Dialog: Click in second time dialog does not call callback function

In old code, evt.id allways is 0, 1, 2,.... It is id of button on native dialog. When dialog is closed by click on Button then evt.id is reseted to 0, but dialogId still increase by 1 (dialogId++ at Line 32 in NATIVE.dialogs.showDialog function). 
So, if you click on button in native dialog at this time, it can not call callback because evt.id = 0 but dialogId not equal 0.