From a506435e6ec737e761cdf906f3bd641435b9e811 Mon Sep 17 00:00:00 2001 From: Ibrahim Awwal Date: Sat, 30 Apr 2016 00:40:01 -0700 Subject: [PATCH] Fix closeOnOverlayClick option The patch I grabbed from #25 actually broke the close on overlay click feature, the close call should have localOptions passed in. This makes that actually work again. Sorry for not actually testing the patch properly :/ --- jquery.the-modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.the-modal.js b/jquery.the-modal.js index c39dbfa..53d885f 100644 --- a/jquery.the-modal.js +++ b/jquery.the-modal.js @@ -178,7 +178,7 @@ if(localOptions.closeOnOverlayClick) { $('.' + localOptions.overlayClass).on('click.' + pluginNamespace, function(e){ if (e.target.className == localOptions.overlayClass){ - $.modal().close(); + $.modal().close(localOptions); } }); }