Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.

Pull to refresh still active while swiping left on item in list (Android) #147

Open
@jgw96

Description

@jgw96

From @mklilley on April 13, 2016 8:18

Hi,

I noticed on Android (Google Nexus 4, Android version 5.1.1) that if I have an ion-refresher on a view which also has a swipable list then if I am at the top of the list and swipe left then pull to refresh is still active, i.e the item swipes left but the whole view is also pulled down - not a nice user experience I would say. If however I have scrolled some way down the list then this behaviour does not occur and swiping left works just as I would expect, i.e. if i swipe left I cannot simultaneously scroll down. This doesn't seem to be a problem on iOS (version 9.3.1).

To reproduce:

  1. Run ionic start test tabs
  2. Go to test directory and run ionic platform add android
  3. Replace the code in tab-dash.html with the following:
<ion-view view-title="Dashboard">

    <ion-content class="padding">

        <ion-refresher pulling-text="Pull to refresh..."></ion-refresher>

        <ion-list>

            <ion-item ng-repeat="item in items">{{item}}

                <ion-option-button class="button-positive">
                    Share
                </ion-option-button>

                <ion-option-button class="button-assertive">
                    Edit
                </ion-option-button>


            </ion-item>

        </ion-list>

    </ion-content>

</ion-view>
  1. Add the following code to DashCtrl inside of controllers.js:

$scope.items = [1,2,3,4,5,6,7,8,9,10,11,12];

  1. Run ionic run android
  2. Swipe left on any item and if you have not been 100% horizontal in your swiping action then you'll notice the view being simultaneously pulled down
  3. Now scroll down a bit so that item number 1 is no longer visible - swipe left now works as it should
  4. Go back to the code, remove ion-refresher and try again - no problems with swipe action.

Copied from original issue: ionic-team/ionic-framework#6149

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions