NanoModal
NanoModal copied to clipboard
defaultHide is not working when display is modified.
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