if onSave callbacks returns false buttons are permanently disabled
zazy opened this issue · comments
Creating new dialog with something like:
var onSave = function(){ return false; };
dialog = new $.Zebra_Dialog({
type: false,
buttons: [{
caption: 'My caption,
callback: onSave
}],
source: {
ajax: {
url: url
}
},
title: title,
width: width
});
If onSave callback returns false and then I close dialog with (X), "My caption" button is permanently disabled even if I create another dialog using another new call. This is indeed strange. Shouldn't the dialog be destroyed when closed?
i can't reproduce this (or i might not understand what the issue is)
if i create a different dialog with a "My caption" button it works correctly, as long as I am not associating the onSave
callback to it. if you associate the onSave
callback to all the "My caption" buttons you create, the result will be the same - nothing
@stefangabos turned out it was a bug in a library that interfere with ZebraDialogs button events. Sorry for being so sloppy 😞
Closing