From: Jacob Thornton Date: Sun, 8 Jan 2012 22:36:41 +0000 (-0800) Subject: only append modal to dom if not already present X-Git-Tag: v2.0.0~6^2~313^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76cadd1d2a493d4cbcfe8acd984bd4f908b25abf;p=thirdparty%2Fbootstrap.git only append modal to dom if not already present --- diff --git a/js/bootstrap-modal.js b/js/bootstrap-modal.js index 98a62865b3..670d55c4ec 100644 --- a/js/bootstrap-modal.js +++ b/js/bootstrap-modal.js @@ -51,8 +51,9 @@ backdrop.call(this, function () { var transition = $.support.transition && that.$element.hasClass('fade') + !that.$element.parent() && that.$element.appendTo(document.body) //don't move modals dom position + that.$element - .appendTo(document.body) .show() if (transition) {