Skip to content

[4.0.0-beta.16] ion-slides not working properly on fresh page load #16364

Closed

Description

@bergben

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.


   ionic (Ionic CLI)             : 4.3.1 (C:\Users\***\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.16
   @angular-devkit/build-angular : 0.10.6
   @angular-devkit/schematics    : 7.0.6
   @angular/cli                  : 7.0.6
   @ionic/angular-toolkit        : 1.2.0

System:

   NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

Describe the Bug
Ionic Slides Component is not working when the page is refreshed.

Steps to Reproduce
Steps to reproduce the behavior:

  1. ionic start tester tabs --type=angular
  2. In home.html add Slides like so:
    <ion-slides>
        <ion-slide>
            <h1>Slide 1</h1>
        </ion-slide>
        <ion-slide>
            <h1>Slide 2</h1>
        </ion-slide>
        <ion-slide>
            <h1>Slide 3</h1>
        </ion-slide>
    </ion-slides>
</ion-content>
  1. ionic serve
  2. Refresh the page where the slides are on with F5 (without needing to navigate)
  3. Slides component is broken (sliding not working etc.)

Related Code
See steps to reproduce

Expected Behavior
Slides component should still work as expected.

Activity

  1. bergben commented on Nov 30, 2018

    @bergben
    Author

    Still an issue in [4.0.0-beta.17], makes the Slides unusable in its current state...

  2. bryce13950 commented on Dec 4, 2018

    @bryce13950

    Could you describe a bit what is happening? Is it just completely broken? Is the animation messed up?

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

    @bergben
    Author

    I think it's best to show with a screen capture:
    Minimal example with starter app: https://imgur.com/a/vh8WK67
    Actual app with the problem: https://imgur.com/a/1CpG38c

    I noticed it does not happen 100% of the time, but a good 50% at least so if you just follow the steps described I think you should be able to reproduce the issue.

    If you need any other information please let me know!

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

    @bryce13950

    Ahhh is it that it is not snapping into place?

  7. bergben commented on Dec 5, 2018

    @bergben
    Author

    Basically yes. The content is not loading correctly either, but I am quite sure that is fixed once the snapping is fixed 👍

  8. added
    needs: reply
    type: bug
    package: core
    and removed
    needs: reply
    on Dec 5, 2018
  9. bryce13950 commented on Dec 5, 2018

    @bryce13950

    Well if you could provide a repository with the source code already ready that would be super helpful. If you can't then that is fine, but it would make fixing the issue itself much easier!

  10. bergben commented on Dec 5, 2018

    @bergben
    Author

    Sure, there you go: https://github.com/bergben/ionic_issue_16364_slides
    Just clone the repo, run npm i and ionic serve. I included a description on possible methods to reproduce the issue in the home tab!

    Let me know if you need anything else!

  11. bryce13950 commented on Dec 6, 2018

    @bryce13950

    Thanks!

  12. bergben commented on Jan 11, 2019

    @bergben
    Author

    I figured out what the problem is: The slides component won't work if it is wrapped in a div that applies [hidden] or *ngIf or if applies it itself.

  13. added a commit that references this issue on Aug 27, 2019
    48a2763
  14. added a commit that references this issue on Aug 27, 2019
    7eb1089
  15. added a commit that references this issue on Aug 27, 2019
    69ee964
  16. liamdebeasi commented on Sep 4, 2019

    @liamdebeasi
    Contributor

    A fix for this is available in Ionic 4.9.0. For any new bugs, please create a new issue.

    Thanks!

  17. ionitron-bot commented on Oct 4, 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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: coretype: bug

    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