Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ionSwipe event not being called when ion-item-options has content #12146

Closed
harshabonthu opened this issue Jun 24, 2017 · 7 comments · Fixed by #12157
Closed

ionSwipe event not being called when ion-item-options has content #12146

harshabonthu opened this issue Jun 24, 2017 · 7 comments · Fixed by #12157
Assignees

Comments

@harshabonthu
Copy link

harshabonthu commented Jun 24, 2017

Ionic version: (check one with "x")
[ ] 1.x (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x

I'm submitting a ... (check one with "x")
[x] bug report
[ ] 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:
Tested in 3.4.2 and 3.4.0 with below code

<ion-list>
  <ion-item-sliding #slidingItem>
    <ion-item>
      Item
    </ion-item>
    <ion-item-options (ionSwipe)="share(slidingItem)">
      <button ion-button (click)="share(slidingItem)">Share</button>
    </ion-item-options>
  </ion-item-sliding>
</ion-list>

With above code ionSwipe event is not being triggered

Same thing if I remove the content inside ion-item-options i.e as shown below, then ionSwipe event is triggered

<ion-list>
  <ion-item-sliding #slidingItem>
    <ion-item>
      Item
    </ion-item>
    <ion-item-options (ionSwipe)="share(slidingItem)">
    </ion-item-options>
  </ion-item-sliding>
</ion-list>

Plunker for 3.4.2 -> Feature Completely broke i.e doesn't work no matter how far you swipe -https://embed.plnkr.co/iVh1yXdwA0l7PC3n4S8T/

Plunker for 3.4.0 -> Feature works -> http://embed.plnkr.co/puyuJKjb1CATwTdtpsIV/

Expected behavior:
ionSwipe event should be fired with or without content inside ion-item-options

Steps to reproduce:
Please refer to the plunker above

I didn't verify this but my guess would be its broke with this commit -> 6193560#diff-de4ce1132acfce42a66591355b348b31

@shawnlan
Copy link

No point ion-item-options has no content. ionSwipe is now completely broken.

@harshabonthu
Copy link
Author

harshabonthu commented Jun 29, 2017

I will try to have a sample repo to replicate this, but we just noticed the Swipe left and right options are laggy and completely broken on all iOS devices when you have a list of 100+ items loaded and try to do the swipe action on 90th item or so. The same works fine on android.

@codebeauty
Copy link

My Swipe Event worked fine in another app but after updating Ionic the feature secretly disappeared. Same problem if you just follow the docs. Please check out the sample repo:

https://github.com/codebeauty/ionic-swipe-bug-12146

Thank you for help.

@LufoX11
Copy link

LufoX11 commented Jul 10, 2017

Same as above. This is an important feature to me since my app trusts in this funcionality to delete items from a list. After updating to @3.5.0 it didn't work anymore. Any workaround in the meanwhile or should we have to wait for the next release? Thanks.

@jithinlal
Copy link

Is there any solution to this bug?

I am using version 3.19, but still not working?

@sebastien-p
Copy link

See ionic-team/ionic-site#1213, adding (ionSwipe) to ion-item-options instead of ion-item-sliding worked for me :)

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants