mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(all): buttons are type="button"
This commit is contained in:
@ -237,7 +237,7 @@ export class ActionSheet implements OverlayInterface {
|
||||
</div>
|
||||
}
|
||||
{buttons.map(b =>
|
||||
<button class={buttonClass(b)} onClick={() => this.buttonClick(b)}>
|
||||
<button type="button" class={buttonClass(b)} onClick={() => this.buttonClick(b)}>
|
||||
<span class="action-sheet-button-inner">
|
||||
{b.icon && <ion-icon icon={b.icon} lazy={false} class="action-sheet-icon" />}
|
||||
{b.text}
|
||||
@ -249,6 +249,7 @@ export class ActionSheet implements OverlayInterface {
|
||||
{cancelButton &&
|
||||
<div class="action-sheet-group action-sheet-group-cancel">
|
||||
<button
|
||||
type="button"
|
||||
class={buttonClass(cancelButton)}
|
||||
onClick={() => this.buttonClick(cancelButton)}
|
||||
>
|
||||
|
@ -315,6 +315,7 @@ export class Alert implements OverlayInterface {
|
||||
<div class="alert-checkbox-group" aria-labelledby={labelledby}>
|
||||
{ inputs.map(i => (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => this.cbClick(i)}
|
||||
aria-checked={i.checked ? 'true' : null}
|
||||
id={i.id}
|
||||
@ -345,6 +346,7 @@ export class Alert implements OverlayInterface {
|
||||
<div class="alert-radio-group" role="radiogroup" aria-labelledby={labelledby} aria-activedescendant={this.activeId}>
|
||||
{ inputs.map(i => (
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => this.rbClick(i)}
|
||||
aria-checked={i.checked ? 'true' : null}
|
||||
disabled={i.disabled}
|
||||
@ -413,7 +415,7 @@ export class Alert implements OverlayInterface {
|
||||
return (
|
||||
<div class={alertButtonGroupClass}>
|
||||
{buttons.map(button =>
|
||||
<button class={buttonClass(button)} tabIndex={0} onClick={() => this.buttonClick(button)}>
|
||||
<button type="button" class={buttonClass(button)} tabIndex={0} onClick={() => this.buttonClick(button)}>
|
||||
<span class="alert-button-inner">
|
||||
{button.text}
|
||||
</span>
|
||||
|
@ -77,6 +77,7 @@ export class BackButton {
|
||||
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
class="back-button-native"
|
||||
onClick={ev => this.onClick(ev)}>
|
||||
<span class="back-button-inner">
|
||||
|
@ -49,7 +49,7 @@ export class MenuButton {
|
||||
const menuIcon = this.config.get('menuIcon', 'menu');
|
||||
return (
|
||||
<ion-menu-toggle menu={this.menu} autoHide={this.autoHide}>
|
||||
<button>
|
||||
<button type="button">
|
||||
<slot>
|
||||
<ion-icon icon={menuIcon} mode={this.mode} color={this.color} lazy={false} />
|
||||
</slot>
|
||||
|
@ -330,6 +330,7 @@ export class PickerColumnCmp {
|
||||
ref={ el => this.optsEl = el }>
|
||||
{ col.options.map((o, index) =>
|
||||
<Button
|
||||
type="button"
|
||||
class={{ 'picker-opt': true, 'picker-opt-disabled': !!o.disabled }}
|
||||
disable-activated
|
||||
opt-index={index}>
|
||||
|
@ -283,6 +283,7 @@ export class Picker implements OverlayInterface {
|
||||
{buttons.map(b => (
|
||||
<div class={buttonWrapperClass(b)}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => this.buttonClick(b)}
|
||||
class={buttonClass(b)}
|
||||
>
|
||||
|
@ -69,6 +69,7 @@ export class SegmentButton {
|
||||
render() {
|
||||
return [
|
||||
<button
|
||||
type="button"
|
||||
aria-pressed={this.checked ? 'true' : null}
|
||||
class="segment-button-native"
|
||||
disabled={this.disabled}
|
||||
|
Reference in New Issue
Block a user