Skip to content

Commit f17f517

Browse files
committed
fix(input): add 'type="button"' to button tag
Add attribute 'type="button"' to button tag. The missing attribute caused forms with ion-toggle/ion-radio to not be submitted as a normal form.
1 parent f723894 commit f17f517

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

ionic/components/radio/radio-button.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {RadioGroup} from './radio-group';
3636
'<div class="radio-inner"></div>' +
3737
'</div>' +
3838
'<button role="radio" ' +
39+
'type="button" ' +
3940
'[id]="id" ' +
4041
'[attr.aria-checked]="_checked" ' +
4142
'[attr.aria-labelledby]="_labelId" ' +

ionic/components/toggle/toggle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const TOGGLE_VALUE_ACCESSOR = new Provider(
5757
'<div class="toggle-inner"></div>' +
5858
'</div>' +
5959
'<button role="checkbox" ' +
60+
'type="button" ' +
6061
'[id]="id" ' +
6162
'[attr.aria-checked]="_checked" ' +
6263
'[attr.aria-labelledby]="_labelId" ' +

0 commit comments

Comments
 (0)