stefangabos / Zebra_Dialog

A small, compact, and highly configurable jQuery plugin for creating beautiful modal dialog boxes

Home Page:https://stefangabos.github.io/Zebra_Dialog/flat.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

if onSave callbacks returns false buttons are permanently disabled

zazy opened this issue · comments

commented

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

commented

@stefangabos turned out it was a bug in a library that interfere with ZebraDialogs button events. Sorry for being so sloppy 😞
Closing