0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-01-29 21:52:22 +01:00

Added type="button" to <button>s without any type (#27174)

(again)

https://github.com/twbs/bootlint/wiki/W007
This commit is contained in:
Herst 2018-09-03 17:55:04 +02:00 committed by Patrick H. Lauke
parent fad49e710e
commit 7b9c8e8eb3
3 changed files with 5 additions and 5 deletions

View File

@ -54,7 +54,7 @@
// Insert copy to clipboard button before .highlight
$('figure.highlight, div.highlight').each(function () {
var btnHtml = '<div class="bd-clipboard"><button class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'
var btnHtml = '<div class="bd-clipboard"><button type="button" class="btn-clipboard" title="Copy to clipboard">Copy</button></div>'
$(this).before(btnHtml)
$('.btn-clipboard')
.tooltip()

View File

@ -522,7 +522,7 @@ Our default modal without modifier class constitutes the "medium" size modal.
{% highlight html %}
<!-- Extra large modal -->
<button class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-xl">Extra large modal</button>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target=".bd-example-modal-xl">Extra large modal</button>
<div class="modal fade bd-example-modal-xl" tabindex="-1" role="dialog" aria-labelledby="myExtraLargeModalLabel" aria-hidden="true">
<div class="modal-dialog modal-xl">

View File

@ -110,10 +110,10 @@
<h1 class="h2">Dashboard</h1>
<div class="btn-toolbar mb-2 mb-md-0">
<div class="btn-group mr-2">
<button class="btn btn-sm btn-outline-secondary">Share</button>
<button class="btn btn-sm btn-outline-secondary">Export</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
<button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
</div>
<button class="btn btn-sm btn-outline-secondary dropdown-toggle">
<button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
<span data-feather="calendar"></span>
This week
</button>