diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 4d24a41ce..d35be7e6b 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -365,7 +365,10 @@ $.fn.modal = function(parameters) { : function(){} ; module.debug('Hiding modal'); - settings.onHide.call(element); + if(settings.onHide.call(element, $(this)) === false) { + module.verbose('Hide callback returned false cancelling hide'); + return; + } if( module.is.animating() || module.is.active() ) { if(settings.transition && $.fn.transition !== undefined && $module.transition('is supported')) { @@ -854,7 +857,7 @@ $.fn.modal.settings = { onVisible : function(){}, // called before hide animation - onHide : function(){}, + onHide : function(){ return true; }, // called after hide animation onHidden : function(){},