# When I click on the swipe button it also clicks on the parent item

**URL:** <https://forum.ionicframework.com/t/when-i-click-on-the-swipe-button-it-also-clicks-on-the-parent-item/97413>\
**Category:** ionic-v3\
**Created:** [July 8, 2017, 10:19am UTC](https://forum.ionicframework.com/t/when-i-click-on-the-swipe-button-it-also-clicks-on-the-parent-item/97413 "2017-07-08T10:19:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![frehley3000](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@frehley3000](https://forum.ionicframework.com/u/frehley3000)\
**Post date:** [July 8, 2017, 10:19am UTC](https://forum.ionicframework.com/t/when-i-click-on-the-swipe-button-it-also-clicks-on-the-parent-item/97413/1 "2017-07-08T10:19:13Z")

</div>

HI! I have a list with some items. Each item has (click)="openChat(chat.$key) and a swipe item with (click)="deleteChat(chat.$key)

The problem is that when I click on the swipe button to call the deleteFunction it also calls the openChat option. Its like both items responds to the click event.

What am I doing wrong?  
Thanks!

```auto
<ion-content>
    <ion-list> 
        <ion-item-sliding *ngFor="let chat of chats | async" (click)="openChat(chat.$key)">
            <ion-item>
                <ion-avatar item-left>
                        <img *ngIf="!(chat.info | async).sPicture" src="assets/images/default.jpg">
                        <img *ngIf="(chat.info | async).sPicture" src="{{(chat.info | async).sPicture}}">
                </ion-avatar>
                <span>{{(chat.info | async).sDisplayName}}</span> 
            </ion-item>

            <ion-item-options side="right">
                <button ion-button color="danger" (click)="deleteChat(chat.$key)">Delete</button>
            </ion-item-options>

        </ion-item-sliding>
    </ion-list>
</ion-content>

```

---

<div class="post-metadata">

**Author:** ![frehley3000](https://avatars.discourse-cdn.com/v4/letter/f/90ced4/32.png) [@frehley3000](https://forum.ionicframework.com/u/frehley3000)\
**Post date:** [July 8, 2017, 11:07am UTC](https://forum.ionicframework.com/t/when-i-click-on-the-swipe-button-it-also-clicks-on-the-parent-item/97413/2 "2017-07-08T11:07:07Z")

</div>

SOLVED!

```auto
<ion-content>
    <ion-list> 
        <ion-item-sliding *ngFor="let chat of chats | async" >
            <ion-item (click)="openChat(chat.$key)">
                <ion-avatar item-left>
                        <img *ngIf="!(chat.info | async).sPicture" src="assets/images/default.jpg">
                        <img *ngIf="(chat.info | async).sPicture" src="{{(chat.info | async).sPicture}}">
                </ion-avatar>
                <span>{{(chat.info | async).sDisplayName}}</span> 
            </ion-item>

            <ion-item-options side="right">
                <button ion-button color="danger" (click)="deleteChat(chat.$key)">Delete</button>
            </ion-item-options>

        </ion-item-sliding>
    </ion-list>
</ion-content>

```
