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-slide inside tabs do not work #8

Closed
justiceo opened this issue Apr 5, 2017 · 8 comments
Closed

ion-slide inside tabs do not work #8

justiceo opened this issue Apr 5, 2017 · 8 comments
Labels

Comments

@justiceo
Copy link

justiceo commented Apr 5, 2017

When there is an ion-slide inside the ion-content of a swipeable tab, it wouldn't slide.
Apparently only the root slide captures the swipe event.

Here is an image of a sample use case for horizontal ion-slide inside ion-content:

horizontal-slide

@ihadeed ihadeed added the bug label Apr 6, 2017
@ihadeed
Copy link
Member

ihadeed commented Apr 6, 2017

Thanks for reporting this. I will experiment with something similar to this and try to find a solution.

@justiceo
Copy link
Author

horizontal ion-scroll doesn't work either

@ihadeed
Copy link
Member

ihadeed commented Apr 14, 2017

@justiceo

I tried reproducing this while working on V2 (#14) with no luck. Not sure if I did something that fixed it or I'm just unable to reproduce the issue.

I put the following code in one of the child pages (one of the tabs):

  <ion-slides slidesPerView="5">
    <ion-slide>
      <span class="color blue"></span>
    </ion-slide>
    <ion-slide>
      <span class="color red"></span>
    </ion-slide>
    <ion-slide>
      <span class="color yellow"></span>
    </ion-slide>
    <ion-slide>
      <span class="color blue"></span>
    </ion-slide>
    <ion-slide>
      <span class="color red"></span>
    </ion-slide>
    <ion-slide>
      <span class="color yellow"></span>
    </ion-slide>
    <ion-slide>
      <span class="color blue"></span>
    </ion-slide>
    <ion-slide>
      <span class="color red"></span>
    </ion-slide>
    <ion-slide>
      <span class="color yellow"></span>
    </ion-slide>
  </ion-slides>
ion-slides {
    height: 80px;

    ion-slide span.color {

      display: block;
      height: 50px;
      width: 50px;

      max-width: 100%;
      border-radius: 500rem;

      &.blue {
        background: blue;
      }

      &.red {
        background: red;
      }

      &.yellow {
        background: yellow;
      }

    }
  }

I tested this on the browser and on an Android device. Didn't experience any unexpected behaviour. I will try ion-scroll too in a bit.

@ihadeed ihadeed mentioned this issue Apr 18, 2017
Merged
@justiceo
Copy link
Author

@ihadeed sorry I didn't notice you responded to this earlier.
I pushed an example code to https://github.com/justiceo/super-tabs-example
The last two commits demonstrate the issues with ion-slide and ion-scroll.
And this is using the previous release of super-tabs, so yes it's possible that these problems have been fixed by now.

@ihadeed
Copy link
Member

ihadeed commented Apr 18, 2017

@justiceo could you please test it with the new version and let me know if you're still experiencing issues?

@justiceo
Copy link
Author

I just did and everything worked perfectly for both ion-slide and ion-scroll! Great work and thanks!

@ihadeed
Copy link
Member

ihadeed commented Apr 18, 2017

Thanks for the update @justiceo !

@Chethannp
Copy link

@justiceo - Can you please share your code, I am still not able to use ion-scroll inside supertabs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants