From bb15d923813345fc487ccea29e6a633974f02768 Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Wed, 28 Mar 2012 14:20:08 -0700 Subject: [PATCH] Fixed leanModal bug that caused lots of overlays to be added. --- static/js/jquery.leanModal.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/js/jquery.leanModal.js b/static/js/jquery.leanModal.js index 3d2dd16bb9..dce1b51804 100644 --- a/static/js/jquery.leanModal.js +++ b/static/js/jquery.leanModal.js @@ -10,9 +10,12 @@ closeButton:'.modal_close' } - var overlay = $("
"); + var overlay = $("#lean_overlay"); + if (overlay.length == 0) { + overlay = $("
"); + $("body").append(overlay); + } - $("body").append(overlay); options = $.extend(defaults, options);