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

Gesture like (swipe)... prevent vertical scroll #6897

Closed
GeeKanJi opened this issue Jun 14, 2016 · 3 comments · Fixed by #7649
Closed

Gesture like (swipe)... prevent vertical scroll #6897

GeeKanJi opened this issue Jun 14, 2016 · 3 comments · Fixed by #7649

Comments

@GeeKanJi
Copy link

GeeKanJi commented Jun 14, 2016

Short description of the problem:

The gestures (like swipe, swipeleft, swiperight, tap...) are blocking the vertical scroll with the virtual scroll or ion-list.
Browser: OK (mouse wheel)
Android Device or emulator: KO: vertical scroll doesn't work, but swipe work

Example with virtual scroll:

<ion-list [virtualScroll]="arrayArticles" approxItemHeight="200px"
          approxHeaderHeight="0px" approxFooterHeight="0px">

    <ion-card  *virtualItem="let article;let idx = index" (click)="itemTapped($event, article)" 
              [virtualTrackBy]="id"
              (swipeleft)="articleSwipeLeft(article,$event, idx)" 
              (swiperight)="articleSwipeRight(article,$event, idx)"
              class="article-ion-card">

        <ArticleImage [article]="article"></ArticleImage>
        <div class="article-card-title" [innerHTML]="article.title"></div>
        <div class="article-card-subtitle" [innerHTML]="(article.publishedDate | amTimeAgo) + ' on ' + article.sourceTitle"></div>

    </ion-card>
</ion-list>

When I select the space between the "ion-card", the vertical scroll is working.

Example with ion-list and ngFor:

<ion-content class="has-header">
  <div padding style="text-align: center;">
    <p>Ionic 2 Test Gesture with ion-list, swipe an item</p>
    <p>With browser: OK. Android Device or emulator: KO: vertical scroll doesn't work</p>

    <ion-list>
      <ion-item *ngFor="let item of items" (swipe)="doSomething(item)">{{item.title}}</ion-item>
    </ion-list>
  </div>
</ion-content>

Ionic V2 (beta 9)

Cordova CLI: 6.2.0
Gulp version: CLI version 1.2.0
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
OS:
Node Version: v4.3.2

@GeeKanJi GeeKanJi changed the title Gesture with Virtual Scroll: The vertical scroll stopped working Gesture like (swipe)... prevent vertical scroll Jun 20, 2016
@jgw96
Copy link
Contributor

jgw96 commented Jun 20, 2016

Hello, thanks for opening an issue with us! Would you be able to provide a plunker that demonstrates this issue? Thanks for using Ionic!

@jgw96 jgw96 added needs: reply the issue needs a response from the user and removed footer labels Jun 20, 2016
@GeeKanJi
Copy link
Author

Hi,

Ok for a plunker, but the problem is not present in the browser.
Browser: OK (mouse wheel)
Android Device or emulator: KO: vertical scroll doesn't work, but swipe work

Here is a plunker with a simple list. But I can reproduce the problem with the virtual scroll.
http://plnkr.co/edit/bjpePx?p=preview

If I run the test page in a device, scroll doesn't work.

I can provide more information if needed

@Ionitron Ionitron removed the needs: reply the issue needs a response from the user label Jun 20, 2016
@jgw96 jgw96 removed the slidebox label Jul 25, 2016
@danbucholtz
Copy link
Contributor

Hi @jeromeXoo,

This is an Angular issue. I went ahead and created an issue for it. We'll track it here too since it's important for Ionic.

angular/angular#10541

Thanks,
Dan

danbucholtz added a commit that referenced this issue Aug 10, 2016
fixes scroll issue with hammer config where pinch/rotate gestures are preventing the screen from
scrolling

closes #6897
adamdbradley pushed a commit that referenced this issue Aug 10, 2016
Fixes scroll issue with hammer config where pinch/rotate gestures are preventing the screen from scrolling.

Closes #6897
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 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.

4 participants