Skip to content

[4.0.0-beta.3] click stops working with ion-slides on scroll #15301

Closed

Description

@persn

Bug Report

Ionic Info

cli packages: (C:\Users\MyUser\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

System:

    Node : v8.11.4
    npm  : 6.4.0
    OS   : Windows 10

Misc:

    backend : pro

Describe the Bug
If I do a scroll down on a page with a ion-slides component then all click events for that component and children stops working. Only reproducible on some OS and web browsers, I have tested with Windows 10 and Chrome, but it seems to work fine on Ubuntu with Chromium.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Fill a page any filler content, enough to fill a page so that the scroll bar is showing.
  2. Add
  <ion-slides>
    <ion-slide>
      <ion-button (click)="onClick()">Click me</ion-button>
    </ion-slide>
  </ion-slides>
  onClick(): void {
    console.log('Do I work?');
  }
  1. npm run start
  2. Open app
  3. Scroll down (scroll bar or mousewheel, doesn't matter)
  4. Click button
  5. Nothing happens

Related Code
Minimum code https://github.com/persn/ionic-slides-scroll-bug

Expected Behavior
I expect to be allowed to click the content of ion-slides after doing a scroll

Additional Context
It might be related to this nolimits4web/swiper#1152

Activity

  1. steinjak commented on Sep 21, 2018

    @steinjak

    Any progress on this?

  2. paulstelzer commented on Dec 3, 2018

    @paulstelzer
    Contributor

    Is this issue still exist in beta.17?

  3. added
    needs: reply
    and removed on Dec 3, 2018
  4. persn commented on Dec 4, 2018

    @persn
    Author

    I updated ionic in my reproduction code, and the issue still persists.

  5. added and removed
    needs: reply
    on Dec 4, 2018
  6. paulstelzer commented on Dec 4, 2018

    @paulstelzer
    Contributor

    I think you have to add some css things because by default the slider is aligned middle, but I will take a look

  7. self-assigned this
    on Dec 4, 2018
  8. paulstelzer commented on Dec 4, 2018

    @paulstelzer
    Contributor

    Can confirm this issue!

    BTW, even if the button is above the list and you scroll first, the button is not working anymore . Now it's the question if this is an issue of swiper.js or Ionic

    Could make it work after I locked the swipes

    @ViewChild('slides') slides: Slides;
    this.slides.lockSwipes(true);
    
      <ion-slides #slides>
        <ion-slide>
          <ion-button (click)="onClick()">Click me</ion-button>
        </ion-slide>
      </ion-slides>
    

    2018-12-04_11-11-50

  9. paulstelzer commented on Dec 4, 2018

    @paulstelzer
    Contributor

    I summarized at #16579 and will close this here. Please follow over there for any progress

  10. ionitron-bot commented on Jan 3, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  11. locked and limited conversation to collaborators on Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions