ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
50.94k stars 13.52k forks source link

Slides doesn't work as expected on iOS #11404

Closed paweljurczynski closed 7 years ago

paweljurczynski commented 7 years ago

Ionic version: (check one with "x") [ ] 1.x [ ] 2.x [ x] 3.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: When I deploy my current state of application to iOS device the slider doesn't work as I expected. Slider is on the first page after application run. It seems to be free mode all the time without transition at all. On Android devices and browser everything works fine. This issue appears only on ios devices.

Expected behavior: The slides should work as on android devices.

Steps to reproduce: Copy from docs the slider and deploy to IOS Device. Try to swipe slider.

Related code:

<ion-slides>
    <ion-slide>
        <h1 style="color: red">Slide 1</h1>
    </ion-slide>
    <ion-slide>
        <h1 style="color: red">Slide 2</h1>
    </ion-slide>
    <ion-slide>
        <h1 style="color: red">Slide 3</h1>
    </ion-slide>
</ion-slides>

Other information: Please look at this issue as soon as possible. I will be very appreciated.

jgw96 commented 7 years ago

Hello, thanks or using Ionic! Could you create a video that shows this issue? I am not able to reproduce this.

paweljurczynski commented 7 years ago

Hey, thank you for a quick reply,

This is a video with issue: https://drive.google.com/file/d/0ByBY5oTSL9fITXNCUUpwOU1hMmc/view?usp=sharing

I think it can be something wrong with loading this slider, cause when I logout an app everything works as expected. It only appears when this is the first view after splash screen. When login and use other sliders everything is ok.

wbhob commented 7 years ago

Maybe share some code? This may be something wrong with how your app handles async grabbing data. Look at console logs and stuff

jgw96 commented 7 years ago

Hmm thats interesting. This sounds like it could be some kind of race condition. Could you share a minimal repo that we could use to reproduce this issue?

paweljurczynski commented 7 years ago

Just try create new project and add a slider to first page. Then you will see this issue, I hope.

paweljurczynski commented 7 years ago

I tried start new app and add slider and this issue doesn't appear :/

paweljurczynski commented 7 years ago

I solved this problem. I've added a hook and update it after enter:

ionViewDidEnter() {
     this.slides.update();
}
jgw96 commented 7 years ago

Awesome, as it seems you have fixed your issue, for now, I am going to close this issue. Thanks!

ionitron-bot[bot] commented 6 years ago

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.