ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.09k stars 13.51k forks source link

bug: ion-item-sliding problems in beta10 #7094

Closed mpaland closed 8 years ago

mpaland commented 8 years ago

Type: bug

Ionic Version: 2.x

Platform: desktop browser

After upgrading to v2.beta10 using ios theme, the <ion-item-sliding> has two big problems:

  1. Using <ion-item-sliding> in a virtual list is extremely unresponsive and laggy. I guess event handlers from the virtual list disturb the sliding event handlers. Using <ion-item-sliding> in a 'normal' list is fine! I tested this in Edge and FF47 browser. This was okay in beta.9.
  2. When the sliding buttons are open, a click on the item closed the buttons. This is broken. Clicking on the item doesn't open the item nor closes the slider.

<ion-list [virtualScroll]="items">
  <ion-item-sliding *virtualItem="let item">
    <button ion-item detail-none (click)="onDetail(item)">
      <ion-thumbnail item-left>
        <img [src]="'item.photo" [style.height.rem]="5.6">
      </ion-thumbnail>
    </button>
    <ion-item-options>
      <button>
        <ion-icon name="text"></ion-icon>
        Test
      </button>
      <button secondary>
        <ion-icon name="call"></ion-icon>
        Call
      </button>
    </ion-item-options>
  </ion-item-sliding>
</ion-list>

mpaland commented 8 years ago

The item sliding is extremely unresponsive on my real Android 6.0 device, too.

This seems to affect all platforms, please remove the 'ios' and 'range' label and add 'list'

jgw96 commented 8 years ago

Hello, thanks for opening an issue with us! Would you be able to provide a plunker or repo that we can use to reproduce this issue please? Thanks!

manucorporat commented 8 years ago

@jgw96 @mpaland don't worry I am aware of this issues. There are not easily fixable without breaking stuff. I have to continue thinking. I meant the issue 2

When the sliding buttons are open, a click on the item closed the buttons. This is broken. Clicking on the item doesn't open the item nor closes the slider.

manucorporat commented 8 years ago

@mpaland issue 2 should be fixed! please, can you open a new issue only with the first issue?

Using in a virtual list is extremely unresponsive and laggy. I guess event handlers from the virtual list disturb the sliding event handlers. Using in a 'normal' list is fine! I tested this in Edge and FF47 browser. This was okay in beta.9.