I am not quite sure if I understand correctly the z-index / overlay issue faced. Nevertheless, here is how you could attach a click event handler to the Cancel button of the dialog:
button = $(
Note the execute
event which has been handled. Here you will find a small sample implementing the above suggestion
with an Editor widget placed in a Kendo Window.