NanoModal icon indicating copy to clipboard operation
NanoModal copied to clipboard

defaultHide is not working when display is modified.

Open ahmohamed opened this issue 9 years ago • 0 comments

I'm using a customShow as follows

nanoModal.customShow = function(defaultShow, modalAPI) {
    defaultShow();
    modalAPI.modal.el.style.display = 'flex';
    modalAPI.modal.el.style['flex-direction'] ='column';
    modalAPI.modal.el.style['max-height'] = 0.8 * el.node().parentNode.clientHeight;
};

This disables the the defaultHide unless I revert to display = 'block' back again. I can see the probelm stemming from:

var isShowing = function() {
    return el.style && el.style.display === "block";
};

Is there a reason why it can't be el.style.display !== "none"?

Thanks

ahmohamed avatar Aug 30 '15 10:08 ahmohamed