0

I have a ngFor list of items. Each item has a swipeleft/swiperight directive that displays a delete button. (Think iOS message interactions). When i go to swipeup however, as if to scroll through the list, i do not get any scrolling with android os. It does recognize the event, because i can add a debug and i get a response when swipeup is triggered, however, it doesn't actually scroll through the list. On iOS, i do not have a problem.

Here is some code i found to hopefully get this to work, but no luck on android.

export class MyHammerConfig extends HammerGestureConfig  {
    overrides = <any>{
        'swipe': {velocity: 0.2, threshold: 10, direction: 31}
    }
}

Im just using basic hammerjs directive for the slide event.

<div  class='list-item-hidden'   *ngFor="let conversation of conversationList" (swipeleft)="openMenu(conversation)" (swiperight)="openMenu(conversation)">

Does android need to be treated differently with Hammerjs and swipeup event?

1 Answer 1

1

you need to add this css to your dom element,

 touch-action: pan-x pan-y !important;

Not the answer you're looking for? Browse other questions tagged or ask your own question.