]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Document limitations of buttons JS plugin 14188/head
authorChris Rebert <code@rebertia.com>
Fri, 18 Jul 2014 18:48:00 +0000 (11:48 -0700)
committerChris Rebert <code@rebertia.com>
Fri, 18 Jul 2014 18:48:00 +0000 (11:48 -0700)
Addresses #14148.

docs/_includes/js/buttons.html

index ee5b3d71d21c29b91c35916f1637dface6e77f83..dbacb632c0435c29e8f3c42170c268dfb6dde18f 100644 (file)
     <h4>Pre-checked options need <code>.active</code></h4>
     <p>For pre-checked options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
   </div>
+  <div class="bs-callout bs-callout-warning">
+    <h4>Visual checked state only updated on click</h4>
+    <p>If the checked state of a checkbox button is updated without firing a <code>click</code> event on the button (e.g. via <code>&lt;input type="reset"&gt;</code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
+  </div>
   <div class="bs-example" style="padding-bottom: 24px;">
     <div class="btn-group" data-toggle="buttons">
       <label class="btn btn-primary active">
     <h4>Preselected options need <code>.active</code></h4>
     <p>For preselected options, you must add the <code>.active</code> class to the input's <code>label</code> yourself.</p>
   </div>
+  <div class="bs-callout bs-callout-warning">
+    <h4>Visual checked state only updated on click</h4>
+    <p>If the checked state of a radio button is updated without firing a <code>click</code> event on the button (e.g. via <code>&lt;input type="reset"&gt;</code> or via setting the <code>checked</code> property of the input), you will need to toggle the <code>.active</code> class on the input's <code>label</code> yourself.</p>
+  </div>
   <div class="bs-example" style="padding-bottom: 24px;">
     <div class="btn-group" data-toggle="buttons">
       <label class="btn btn-primary active">