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

ion-scroll horizontal scroll not working on Android & Browser #9761

Closed
ernofi opened this issue Dec 22, 2016 · 17 comments
Closed

ion-scroll horizontal scroll not working on Android & Browser #9761

ernofi opened this issue Dec 22, 2016 · 17 comments
Labels
ionitron: v3 moves the issue to the ionic-v3 repository

Comments

@ernofi
Copy link

ernofi commented Dec 22, 2016

Ionic version: (check one with "x")
[ ] 1.x
[X] 2.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:
I have the following code in my app:

<ion-scroll scrollX="true" id="lines">
        <div class="line" *ngFor="let line of lines" (tap)="selectLine(line)">{{ line }}</div>
</ion-scroll>

It should allow to scroll horizontally but it's not working on Android. With iOS everything goes fine.

It generates the following HTML:
touch-action: pan-y;

<div class="line" style="touch-action: pan-y; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Line 10</div>

Expected behavior:
It should generate:
touch-action: pan-x;

<div class="line" style="touch-action: pan-x; user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);">Line 10</div>

Ionic info:

Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.1.17
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.48
ios-deploy version: 1.9.0 
ios-sim version: 5.0.8 
OS: macOS Sierra
Node Version: v5.8.0
Xcode version: Xcode 8.2 Build version 8C38
@jgw96 jgw96 added the v2 label Dec 22, 2016
@royipressburger
Copy link

Having the same issue. This worked on rc3 and stoped on rc4

@SleimanB
Copy link

Yes Me To Having the same issue. This worked on rc3 and stoped on rc4

@jgw96
Copy link
Contributor

jgw96 commented Jan 10, 2017

Hello! What version of Android are you guys experiencing this issue on? Unfortunately i cannot reproduce this issue on a Moto X 2014 running Android 5.1.1, Nexus 7 running Android 6.0.1 or a Nexus 6 running Android 7.1.1.

@jgw96 jgw96 added the needs: reply the issue needs a response from the user label Jan 10, 2017
@SleimanB
Copy link

SleimanB commented Jan 11, 2017

Hey @jgw96 Well Im using Samsung Android 6.0.1 And Samsung Android 5.0.1, My Code

 <ion-scroll scrollX="true" style="margin-top: 25px;" class="horizontal-categories"> 
    <ion-row>
      <ion-colwidth-30 class="horizontal-item"  *ngFor="let branchTop of branchListTop" >
        <preload-image [ratio]="{w:1, h:1}" [src]="branchTop.business.imageURL"  title="" class="top-    branch-img"></preload-image>
        <p color="violet" ><b>{{ branchTop.business.name }}</b></p>
        <p class="item-description">{{ branchTop.address }}</p>
      </ion-col>
    </ion-row>
  </ion-scroll> 

RC3 Worked 100%

@ernofi
Copy link
Author

ernofi commented Jan 11, 2017

Hello, @jgw96 ! I'm using Huawei Honor 7 with Android 6.0.

I temporarily fixed this issue in my app by adding following line to the .scss file
.line { touch-action: pan-x !important; }

@jgw96
Copy link
Contributor

jgw96 commented Jan 26, 2017

Hello everyone! Is this still an issue with the 2.0 release yesterday?

@ernofi
Copy link
Author

ernofi commented Jan 30, 2017

Hello @jgw96 !

Still having the problem. App is running on the Android but debugging with Chrome developer tools.

This time I'm using Galaxy J5 with Android 6.0.1. Ionic is updated to version 2.0.0.

I recorded short video to YouTube: https://youtu.be/qdHWyQbrJWI

@jgw96 jgw96 removed the needs: reply the issue needs a response from the user label Feb 17, 2017
@gongalt
Copy link

gongalt commented Feb 20, 2017

Hi, did anyone get this fixed?

@JWesorick
Copy link

JWesorick commented Mar 5, 2017

Still having this problem for me in the browser with 2.0.

Edit: Realized it works with a two finger scroll on my track pad, but not with a click and drag or a scroll using my usb mouse.

@n40jpj
Copy link

n40jpj commented Mar 6, 2017

Any answers to this, it was working in rc5 but not working in 2.1.0, any fixes yet?

@Arnaud49
Copy link

Hi here, having this problem too. Still nothing to fix it ? I even try the fix proposed with touch-action but it doesn't work.

@SleimanB
Copy link

can you please @Arnaud49 provide us your code ? cz for me now its worked like a charm

@HugoHeneault
Copy link

I still have this bug. Anyone managed to get it working on > 3 ?

@saschwarz
Copy link

saschwarz commented Mar 3, 2018

Still an issue in Ionic 3.92 on Android devices. Inspired by hammerjs/hammer.js#1050 (comment) I needed x-y pan and this SCSS worked for me:

    .scroll-content {
        touch-action: pan-x pan-y !important;
        * {
            touch-action: pan-x pan-y !important;
        }
    }

@miquelferrerllompart
Copy link

Some update for this bug?

@adamdbradley adamdbradley added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 1, 2018
@imhoffd imhoffd removed the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 28, 2018
@Ionitron Ionitron added the ionitron: v3 moves the issue to the ionic-v3 repository label Nov 28, 2018
@ionitron-bot
Copy link

ionitron-bot bot commented Nov 28, 2018

This issue has been automatically identified as an Ionic 3 issue. We recently moved Ionic 3 to its own repository. I am moving this issue to the repository for Ionic 3. Please track this issue over there.

If I've made a mistake, and if this issue is still relevant to Ionic 4, please let the Ionic Framework team know!

Thank you for using Ionic!

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 28, 2018

Issue moved to: ionic-team/ionic-v3#155

@ionitron-bot ionitron-bot bot closed this as completed Nov 28, 2018
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ionitron: v3 moves the issue to the ionic-v3 repository
Projects
None yet
Development

No branches or pull requests