fix(all): buttons are type="button"

This commit is contained in:
Manu Mtz.-Almeida
2018-08-07 20:27:57 +02:00
parent 4e565926cd
commit 2b7007f38e
7 changed files with 10 additions and 3 deletions

View File

@ -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)}
>

View File

@ -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>

View File

@ -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">

View File

@ -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>

View File

@ -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}>

View File

@ -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)}
>

View File

@ -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}