Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49230

Ionic 4 IonSlides bug? with screen orientation change

$
0
0

@arnhrwd wrote:

IonSlides does not properly update when the screen orientation changes. E.g. consider the following code snippet:

@ViewChild(IonSlides) slides: IonSlides;
constructor(private screenOrientation: ScreenOrientation){}
public ionViewWillEnter() {
    this.slides.update();
}
public ngOnInit() {
    this.screenOrientation.onChange().subscribe(
      () => {
          this.slides.update();
      }
    );
}

The update() method is called and works (solving a problem) for the ionViewWillEnter() hook. However while the update() method is called anytime a screen orientation changes (confirmed), it does not seem to have effect - the IonSlides displays incorrectly in this case. Any idea how to fix this? The IonSlides codebase has swiper as private so I can’t get to anything in there. BTW: confirmed on Samsung S9+ with the Dalvik debugger if that means anything.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49230

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>