Skip to content

Commit 28ce6b0

Browse files
committed
fix: add type="button" to buttons in CDropdown component
1 parent 662f9fe commit 28ce6b0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/dropdown/CDropdown.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export default {
196196
197197
togglerAttrs () {
198198
return {
199+
'type': 'button',
199200
'aria-expanded': this.visible ? 'true' : 'false',
200201
'aria-haspopup': 'true',
201202
}

src/components/dropdown/tests/__snapshots__/CDropdown.spec.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ exports[`CDropdown renders correctly 1`] = `
88
aria-expanded="false"
99
aria-haspopup="true"
1010
class="btn dropdown-toggle"
11+
type="button"
1112
>
1213
Dropdown
1314
</button>
@@ -30,6 +31,7 @@ exports[`CDropdown renders correctly inNav 1`] = `
3031
class="additional-toggler-class nav-link bg-success"
3132
href="#"
3233
target="_self"
34+
type="button"
3335
>
3436
Dropdown button
3537
</a>
@@ -58,6 +60,7 @@ exports[`CDropdown renders custom wrapper correctly 1`] = `
5860
aria-expanded="true"
5961
aria-haspopup="true"
6062
class="dropdown-toggle dropdown-toggle-split additional-toggler-class btn btn-lg btn-success"
63+
type="button"
6164
/>
6265
6366
<div

0 commit comments

Comments
 (0)