diff --git a/core/src/components/button/button.tsx b/core/src/components/button/button.tsx index daf4f522e2..2481c36340 100644 --- a/core/src/components/button/button.tsx +++ b/core/src/components/button/button.tsx @@ -1,6 +1,6 @@ import { Component, Element, Event, EventEmitter, Prop, State } from '@stencil/core'; import { Color, CssClassMap, Mode, RouterDirection } from '../../interface'; -import { openURL } from '../../utils/theme'; +import { getParentNode, openURL } from '../../utils/theme'; @Component({ @@ -118,6 +118,32 @@ export class Button { this.ionBlur.emit(); } + onClick(ev: Event) { + if (this.type === 'submit') { + // this button wants to specifically submit a form + // climb up the dom to see if we're in a