]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
document that show-ing a tooltip/popover on a hidden element doesn't work; fixes... 13423/head
authorChris Rebert <code@rebertia.com>
Fri, 25 Apr 2014 01:06:42 +0000 (18:06 -0700)
committerChris Rebert <code@rebertia.com>
Fri, 25 Apr 2014 01:06:59 +0000 (18:06 -0700)
docs/_includes/js/popovers.html
docs/_includes/js/tooltips.html

index 95868af1a4d5ad8f6a72dbdd26a5dcaca381e10a..b2f58fbc4810d98eb6eb27b737ec77a8246f7225 100644 (file)
     <h4>Popovers in button groups and input groups require special setting</h4>
     <p>When using popovers on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the popover is triggered).</p>
   </div>
+  <div class="bs-callout bs-callout-warning">
+    <h4>Don't try to show popovers on hidden elements</h4>
+    <p>Invoking <code>$(...).popover('show')</code> when the target element is <code>display: none;</code> will cause the popover to be incorrectly positioned.</p>
+  </div>
   <div class="bs-callout bs-callout-info">
     <h4>Popovers on disabled elements require wrapper elements</h4>
     <p>To add a popover to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code>&lt;div&gt;</code> and apply the popover to that <code>&lt;div&gt;</code> instead.</p>
index 83ef82e06c76dfb0b9d60e2ffbe9e79e00b95e44..64ea06e85e00d98fe33146a070ffbe231de7f652 100644 (file)
     <h4>Tooltips in button groups and input groups require special setting</h4>
     <p>When using tooltips on elements within a <code>.btn-group</code> or an <code>.input-group</code>, you'll have to specify the option <code>container: 'body'</code> (documented below) to avoid unwanted side effects (such as the element growing wider and/or losing its rounded corners when the tooltip is triggered).</p>
   </div>
+  <div class="bs-callout bs-callout-warning">
+    <h4>Don't try to show tooltips on hidden elements</h4>
+    <p>Invoking <code>$(...).tooltip('show')</code> when the target element is <code>display: none;</code> will cause the tooltip to be incorrectly positioned.</p>
+  </div>
   <div class="bs-callout bs-callout-info">
     <h4>Tooltips on disabled elements require wrapper elements</h4>
     <p>To add a tooltip to a <code>disabled</code> or <code>.disabled</code> element, put the element inside of a <code>&lt;div&gt;</code> and apply the tooltip to that <code>&lt;div&gt;</code> instead.</p>