Skip to content

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

Closed

Description

@harshabonthu

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

Activity

  1. shawnlan commented on Jun 24, 2017

    @shawnlan

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

  2. self-assigned this
    on Jun 26, 2017
  3. added a commit that references this issue on Jun 26, 2017
    92c082a
  4. harshabonthu commented on Jun 29, 2017

    @harshabonthu
    Author

    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.

  5. codebeauty commented on Jul 4, 2017

    @codebeauty

    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.

  6. added a commit that references this issue on Jul 10, 2017
    b5aa304
  7. LufoX11 commented on Jul 10, 2017

    @LufoX11

    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.

  8. jithinlal commented on Jan 9, 2018

    @jithinlal

    Is there any solution to this bug?

    I am using version 3.19, but still not working?

  9. sebastien-p commented on Jun 13, 2018

    @sebastien-p

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

  10. ionitron-bot commented on Sep 1, 2018

    @ionitron-bot

    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.

  11. locked and limited conversation to collaborators on Sep 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions