aboutsummaryrefslogtreecommitdiff
path: root/docs/_includes/js
diff options
context:
space:
mode:
authorKevin Kirsche <[email protected]>2015-02-24 18:02:16 -0500
committerHeinrich Fenkart <[email protected]>2015-02-25 03:23:02 +0100
commit769c27a19f4ce8d5d298cedc07905d5300022e24 (patch)
treeca3fa6e7d23256cd4abbb4978fd2d5ac0c1f9155 /docs/_includes/js
parentc40c31a308ed05869c33a4ecb8b5af76fd20d25d (diff)
downloadbootstrap-769c27a19f4ce8d5d298cedc07905d5300022e24.tar.xz
bootstrap-769c27a19f4ce8d5d298cedc07905d5300022e24.zip
Document how to properly handle modals with dynamic content height
Fixes #15106. Closes #15910.
Diffstat (limited to 'docs/_includes/js')
-rw-r--r--docs/_includes/js/modal.html3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/_includes/js/modal.html b/docs/_includes/js/modal.html
index 1b653d17c..0e2de1d61 100644
--- a/docs/_includes/js/modal.html
+++ b/docs/_includes/js/modal.html
@@ -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>