question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Ionic v4.0.0-beta.8] ion-slides positioning bug

See original GitHub issue

Bug Report

Ionic Info Ionic:

ionic (Ionic CLI) : 4.1.2 (C:\Users\Gezbo\AppData\Roaming\npm\node_modules\ionic) Ionic Framework : @ionic/angular 4.0.0-beta.7 @angular-devkit/core : 0.7.5 @angular-devkit/schematics : 0.7.5 @angular/cli : 6.1.5 @ionic/ng-toolkit : 1.0.8 @ionic/schematics-angular : 1.0.6

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : none Cordova Plugins : not available

System:

Android SDK Tools : 26.1.1 (C:\Android\android-sdk) NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe) npm : 6.4.1 OS : Windows 10

Describe the Bug If you have an ion-slides element on the default home page the calculated width (applied by ionic) of the ion-slide elements is of a value similar to the full screen (instead of the main pane) causing the content to look like it is not centered. If you reload the page by navigating to another page and back again, this issue does not occur.

issue

Steps to Reproduce

  1. Create a sidemenu project via the cli
  2. Move the 2 pages into a ‘pages’ folder and update the routing/references
  3. Create a component to hold the ion-slides
  4. Add the component to the default home page
  5. Load the app

Expected Behavior When the app loads, the ion-slides should load in the same way as when the page is accessed via the menu,

Additional Context I think this is something to do with the rendering order. In the bug scenario, all the ion-slide elements seem to have a width that is roughly equal to the page width, leading me to believe that somehow,the pane width has not been calculated and so is not used. When you load the page via the menu item, the pane has already been rendered so the width is known, so the problem does not manifest.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bitflowercommented, Sep 14, 2018
0reactions
ionitron-bot[bot]commented, Jan 3, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ion-Slides: Mobile Touch Slider with Built-In & Custom Animation
Ion-Slides is a multi-section container which offers custom and built-in mobile touch slider animation effects. See how Ion-Slides works with iOS and ...
Read more >
ion-slides methods not working in ionic 4 - Stack Overflow
I want to get active index of slide. online documentation is not complete about how to implement it. ionic4 · Share.
Read more >
How to use Swiper with Ionic (instead of ion-slides) - YouTube
In this video we will implement the Swiper component without ion-slides, since it will be deprecated with Framework v6! Learn Ionic...
Read more >
Source - GitHub
[6.4.0](https://github.com/ionic-team/ionic-framework/compare/v6.3.10...v6.4.0) ... (2022-11-22) ### Bug Fixes * **modal:** status bar style defaults to app ...
Read more >
Ionic 4 alternative for platform.registerBackButtonAction
Solution. Update: This was fixed in v4.0.0-beta.8 (dfac9dc) · Related: how to integrate hardware back button into ionic4 navigation ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found