In case there are a couple of opened modal windows(win1, win2, win3, win4) after destroying one that was closed(win5) – two next in chain(win3 and win4) becomes enabled, instead of only the last one(win4).
I’ve analyzed the code of method kendoWindow.destroy and found following lines
if (shouldHideOverlay) {
that._overlay(false).remove();
} else if (modalWindows.length > 0) {
windowObject(modalWindows.eq(modalWindows.length - 2), that.options.name)._overlay(true);
}
It seems that line
modalWindows.length - 2
should be changed to
modalWindows.length - 1
as modalWindows holds currenlty opened windows, and overlay should be turned on for the last one.