fix(tap-click): nested buttons get activated first

This commit is contained in:
Manu Mtz.-Almeida
2018-08-12 23:09:53 +02:00
parent 0842939273
commit 03da98e233

View File

@ -148,7 +148,7 @@ export function startTapClick(doc: Document) {
function getActivatableTarget(ev: any): any { function getActivatableTarget(ev: any): any {
if (ev.composedPath) { if (ev.composedPath) {
const path = ev.composedPath() as HTMLElement[]; const path = ev.composedPath() as HTMLElement[];
for (let i = path.length - 3; i >= 0; i--) { for (let i = 0; i < path.length - 2; i++) {
const el = path[i]; const el = path[i];
if (el.hasAttribute && el.hasAttribute('ion-activable')) { if (el.hasAttribute && el.hasAttribute('ion-activable')) {
return el; return el;