mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-17 21:49:09 +01:00
Fixes #7898: ensure button type
Sets `type="button"` on all buttons in the docs
This commit is contained in:
parent
31dcb91189
commit
6307dc40d7
@ -269,6 +269,9 @@ body {
|
||||
.bs-example > .well:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.bs-example > .close {
|
||||
float: none;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
.bs-example-type .table td {
|
||||
|
@ -602,7 +602,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" style="margin-bottom: 10px;">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -612,7 +612,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -622,7 +622,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">Danger <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -632,7 +632,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown">Warning <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -642,7 +642,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown">Success <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -656,7 +656,7 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
{% highlight html %}
|
||||
<!-- Single button -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
Action <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@ -674,8 +674,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar" style="margin: 0;">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default">Action</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -685,8 +685,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary">Action</button>
|
||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-primary">Action</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -696,8 +696,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-danger">Danger</button>
|
||||
<button class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-danger">Danger</button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -707,8 +707,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-warning">Warning</button>
|
||||
<button class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-warning">Warning</button>
|
||||
<button type="button" class="btn btn-warning dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -718,8 +718,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-success">Success</button>
|
||||
<button class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-success">Success</button>
|
||||
<button type="button" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -733,8 +733,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
{% highlight html %}
|
||||
<!-- Split button -->
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-default">Action</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<button type="button" class="btn btn-default">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@ -805,8 +805,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
<div class="bs-example">
|
||||
<div class="btn-toolbar">
|
||||
<div class="btn-group dropup">
|
||||
<button class="btn btn-default">Dropup</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -816,8 +816,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</ul>
|
||||
</div><!-- /btn-group -->
|
||||
<div class="btn-group dropup">
|
||||
<button class="btn btn-primary">Right dropup</button>
|
||||
<button class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-primary">Right dropup</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -830,8 +830,8 @@ lead: "Dozens of reusable components built to provide iconography, dropdowns, na
|
||||
</div><!-- /example -->
|
||||
{% highlight html %}
|
||||
<div class="btn-group dropup">
|
||||
<button class="btn btn-default">Dropup</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<button type="button" class="btn btn-default">Dropup</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
|
@ -1506,7 +1506,7 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<form class="bs-example">
|
||||
<div class="input-group col col-lg-7">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -1521,7 +1521,7 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<div class="input-group col col-lg-7">
|
||||
<input type="text">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -1535,7 +1535,7 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
{% highlight html %}
|
||||
<div class="input-group col col-lg-7">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -1550,7 +1550,7 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<div class="input-group col col-lg-7">
|
||||
<input type="text">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">Action <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Action</a></li>
|
||||
<li><a href="#">Another action</a></li>
|
||||
@ -1566,8 +1566,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<form class="bs-example">
|
||||
<div class="input-group col col-lg-7">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@ -1586,8 +1586,8 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<div class="input-group col col-lg-7">
|
||||
<input type="text">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<button type="button" class="btn btn-default" tabindex="-1">Action</button>
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" tabindex="-1">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@ -1875,10 +1875,10 @@ For example, <code><section></code> should be wrapped as inline.
|
||||
<h3>Close icon</h3>
|
||||
<p>Use the generic close icon for dismissing content like modals and alerts.</p>
|
||||
<div class="bs-example">
|
||||
<p><button class="close" style="float: none;">×</button></p>
|
||||
<p><button type="button" class="close">×</button></p>
|
||||
</div>
|
||||
{% highlight html %}
|
||||
<button class="close" style="float: none;">×</button>
|
||||
<button type="button" class="close">×</button>
|
||||
{% endhighlight %}
|
||||
|
||||
<h3>.pull-left</h3>
|
||||
|
Loading…
x
Reference in New Issue
Block a user