]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Document how to properly handle modals with dynamic content height
authorKevin Kirsche <kkirsche@ansfederal.com>
Tue, 24 Feb 2015 23:02:16 +0000 (18:02 -0500)
committerHeinrich Fenkart <hnrch02@gmail.com>
Wed, 25 Feb 2015 02:23:02 +0000 (03:23 +0100)
Fixes #15106.
Closes #15910.

docs/_includes/js/modal.html

index 1b653d17c0abee7cd31a779a20c5cdfb589c0793..0e2de1d61b68d05838f40eb259e0d6b16dd99d96 100644 (file)
@@ -394,6 +394,9 @@ $('#exampleModal').on('show.bs.modal', function (event) {
 })
 {% endhighlight %}
 
+  <h2 id="modals-handle-update">Modals with dynamic heights</h2>
+  <p>If the height of a modal changes while it is open, you should call <code>$('#myModal').data('bs.modal').handleUpdate()</code> to readjust the modal's position in case a scrollbar appears.</p>
+
   <h2 id="modals-usage">Usage</h2>
   <p>The modal plugin toggles your hidden content on demand, via data attributes or JavaScript. It also adds <code>.modal-open</code> to the <code>&lt;body&gt;</code> to override default scrolling behavior and generates a <code>.modal-backdrop</code> to provide a click area for dismissing shown modals when clicking outside the modal.</p>