mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 09:52:29 +01:00
Merge pull request #14191 from twbs/autocomplete-off-btns
Use autocomplete="off" in buttons plugin docs examples
This commit is contained in:
commit
4a98e2d765
@ -340,7 +340,8 @@ module.exports = function (grunt) {
|
|||||||
reset: true,
|
reset: true,
|
||||||
relaxerror: [
|
relaxerror: [
|
||||||
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
|
'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
|
||||||
'Element img is missing required attribute src.'
|
'Element img is missing required attribute src.',
|
||||||
|
'Attribute autocomplete not allowed on element input at this point.'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
files: {
|
files: {
|
||||||
|
@ -44,26 +44,26 @@
|
|||||||
<div class="bs-example" style="padding-bottom: 24px;">
|
<div class="bs-example" style="padding-bottom: 24px;">
|
||||||
<div class="btn-group" data-toggle="buttons">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
<label class="btn btn-primary active">
|
<label class="btn btn-primary active">
|
||||||
<input type="checkbox" checked> Option 1 (pre-checked)
|
<input type="checkbox" autocomplete="off" checked> Option 1 (pre-checked)
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="checkbox"> Option 2
|
<input type="checkbox" autocomplete="off"> Option 2
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="checkbox"> Option 3
|
<input type="checkbox" autocomplete="off"> Option 3
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /example -->
|
</div><!-- /example -->
|
||||||
{% highlight html %}
|
{% highlight html %}
|
||||||
<div class="btn-group" data-toggle="buttons">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
<label class="btn btn-primary active">
|
<label class="btn btn-primary active">
|
||||||
<input type="checkbox" checked> Option 1 (pre-checked)
|
<input type="checkbox" autocomplete="off" checked> Option 1 (pre-checked)
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="checkbox"> Option 2
|
<input type="checkbox" autocomplete="off"> Option 2
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="checkbox"> Option 3
|
<input type="checkbox" autocomplete="off"> Option 3
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
@ -77,26 +77,26 @@
|
|||||||
<div class="bs-example" style="padding-bottom: 24px;">
|
<div class="bs-example" style="padding-bottom: 24px;">
|
||||||
<div class="btn-group" data-toggle="buttons">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
<label class="btn btn-primary active">
|
<label class="btn btn-primary active">
|
||||||
<input type="radio" name="options" id="option1" checked> Option 1 (preselected)
|
<input type="radio" name="options" id="option1" autocomplete="off" checked> Option 1 (preselected)
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="radio" name="options" id="option2"> Option 2
|
<input type="radio" name="options" id="option2" autocomplete="off"> Option 2
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="radio" name="options" id="option3"> Option 3
|
<input type="radio" name="options" id="option3" autocomplete="off"> Option 3
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div><!-- /example -->
|
</div><!-- /example -->
|
||||||
{% highlight html %}
|
{% highlight html %}
|
||||||
<div class="btn-group" data-toggle="buttons">
|
<div class="btn-group" data-toggle="buttons">
|
||||||
<label class="btn btn-primary active">
|
<label class="btn btn-primary active">
|
||||||
<input type="radio" name="options" id="option1" checked> Option 1 (preselected)
|
<input type="radio" name="options" id="option1" autocomplete="off" checked> Option 1 (preselected)
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="radio" name="options" id="option2"> Option 2
|
<input type="radio" name="options" id="option2" autocomplete="off"> Option 2
|
||||||
</label>
|
</label>
|
||||||
<label class="btn btn-primary">
|
<label class="btn btn-primary">
|
||||||
<input type="radio" name="options" id="option3"> Option 3
|
<input type="radio" name="options" id="option3" autocomplete="off"> Option 3
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
@ -144,7 +144,7 @@ $('.btn').button()
|
|||||||
|
|
||||||
<div class="bs-callout bs-callout-danger">
|
<div class="bs-callout bs-callout-danger">
|
||||||
<h4>Cross-browser compatibility</h4>
|
<h4>Cross-browser compatibility</h4>
|
||||||
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
|
<p><a href="https://github.com/twbs/bootstrap/issues/793">Firefox persists form control states (disabledness and checkedness) across page loads</a>. A workaround for this is to use <code>autocomplete="off"</code>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>$().button('reset')</h4>
|
<h4>$().button('reset')</h4>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user