Closed ReaperTech closed 4 years ago
Thanks for the issue! This issue has been labeled as needs reproduction
. This label is added to issues that need a code reproduction.
Please provide a reproduction with the minimum amount of code required to reproduce the issue. Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed.
For a guide on how to create a good reproduction, see our Contributing Guide.
This sounds like a related bug which was resolved? https://github.com/ionic-team/ionic-framework/issues/20356
I have tried and failed to reproduce this bug in a new project. Please can you look at it and see if you can see anything that could be causing the issue?
ion-slides
is powered by Swiper, a third party library that Ionic Framework does not manage, so it is hard for me to investigate this issue without a full code reproduction. Did you try to reproduce the issue in a blank Ionic starter application?
ion-slides
is powered by Swiper, a third party library that Ionic Framework does not manage, so it is hard for me to investigate this issue without a full code reproduction. Did you try to reproduce the issue in a blank Ionic starter application?
Yes it was blank but I added the relevant packages. I looked through previous bugs and found this one is similar in nature https://github.com/ionic-team/ionic-framework/issues/20356 ie the slider only works once because swiper doesn't get reinitialized. There is some incompatibility issue between swiper and ionic 5.3.0. I'm sure other users will experience the same issue at some point.
Yes, that issue was fixed several versions ago. It looks like you are using Ionic Framework v5.3.0, so you already have that fix.
Unfortunately, I cannot fix the issue without being able to reproduce it on my end. If you can find a way to reproduce the issue in a GitHub repo that would be great, otherwise I am going to have to close this issue. Thanks!
Yes, that issue was fixed several versions ago. It looks like you are using Ionic Framework v5.3.0, so you already have that fix.
Unfortunately, I cannot fix the issue without being able to reproduce it on my end. If you can find a way to reproduce the issue in a GitHub repo that would be great, otherwise I am going to have to close this issue. Thanks!
I will try again to reproduce
The workaround in this bug report https://github.com/ionic-team/ionic-framework/issues/20356 (postpone the slider initialization with ngIf and the angular lifecycle) works to make the slides the correct width again, but there is still a performance issue of the slides taking between 3 and 5 seconds to appear. Turning off ivy does not help with either issue.
The solution is to npm install ngx-swiper-wrapper --save
and use that for PWA. See documentation here https://www.npmjs.com/package/ngx-swiper-wrapper and here https://github.com/zefoy/ngx-swiper-wrapper#readme. The correct import for the css is @import '~swiper/css/swiper.min.css';
Ion-slides not working
Hi there,
I am going to close this issue as I am unable to reproduce the issue you are describing. If you are able to provide a GitHub repo that showcases the issue, please feel free to create a new bug report. Thanks!
Bug Report
Ionic version:
[ ] 4.x [x] 5.3.0
Current behavior: On first visit to page that has slides, the slides are the correct width as per "slides per page". If I navigate away and come back each slide takes the full screen width. The slides are also very slow to load, taking as much as 5 seconds. I am using saved icons in the slides so it is not the images in the slides causing the lag. BUT THE MAIN ISSUE IS THE WIDTH. I have just updated from ionic 4.4.0 and there were no problems, and I have not changed any code relating to the slides.
Expected behavior: the slides should be the correct width as per "slides per page"
Steps to reproduce: Steps as described above.
Related code:
Other information: Turning off ivy by adding following to tsconfig.app.json and running ionic serve doesn't help. Is this issue related to this other (resolved) bug: https://github.com/ionic-team/ionic-framework/issues/20356
Ionic info: