]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
only append modal to dom if not already present
authorJacob Thornton <jacobthornton@gmail.com>
Sun, 8 Jan 2012 22:36:41 +0000 (14:36 -0800)
committerJacob Thornton <jacobthornton@gmail.com>
Sun, 8 Jan 2012 22:36:41 +0000 (14:36 -0800)
js/bootstrap-modal.js

index 98a62865b37ec37af1b84559c9563af1e0811685..670d55c4ec913353d6666568c49fe3611decc3df 100644 (file)
@@ -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) {