Skip to content

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

@ernofi

Description

@ernofi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions