dhtmlx message and onbeforeunload

hi, I am using dhtmlx message for displaying notifications. everything is fine, except the onbeforeunload function. if i use the js function it is not working correctly, the notification appears, but the page is unloading. if i use it with jquery bind, the same is happen.

jQuery(window).bind('beforeunload', function() { dhtmlx.confirm({ title: 'exit', type: 'confirm-warning', expire: -1, text: 'exit', callback: function(result) { return result; } }); });

No solution?

You can’t use dhtmlxmessage from onbeforeunload event, in that moment page is already unloading and message lib can’t block that process.