Skip to content

Button inside button ion-item #9736

@loopezz

Description

@loopezz

Ionic version: (check one with "x")
[ ] 1.x
[ X ] 2.x

I'm submitting a ... (check one with "x")
[ ] bug report
[ X ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/

Current behavior:
a. button inside button ion-item doesn't trigger click but does trigger the button click
b. button inside ion-item triggers click and ion-item click

Expected behavior:
a. & b. button inside an (button) ion-item should be clickable and trigger the handler for only that button.

This will be usefull in case you want to have an info page for the desired ion-item.

Steps to reproduce:
http://plnkr.co/edit/Xo8OIkjSb3Zx4EDe1lbl?p=preview

Related code:
<button ion-item icon-right (click)="buttonClick()">
Button ion-item
<button ion-button icon-only clear item-right (click)="iconClick()">

<ion-item icon-right (click)="buttonClick()">
ion-item
<button ion-button icon-only clear item-right (click)="iconClick()">

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):
Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.47
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v4.6.0
Xcode version: Not installed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions