You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v6.x
Current Behavior
ion-content has the following CSS variables:
--offset-top: 56px;
--offset-bottom: 64px;
The values are set dynamically by Ionic, depending on the height of the content of ion-header and ion-footer. So far, so good. However, this only works correctly sometimes, and other times it does not. For example, we have a page like this:
Since we assign a background image to our ion-content, the error in the incorrect offset calculation is very noticeable. When the appload event is fired again (window.dispatchEvent(new Event('appload'));) afterward, ion-content will correct the offsets, and they will be accurate. See in this video:
chrome_ACltntBpUu.mp4
Expected Behavior
By subsequently firing window.dispatchEvent(new Event('appload')); with a timeout, there is a brief flickering, as the user briefly sees the black area. I would wish that in any case, ion-content always determines the correct offset values by itself and automatically.
Steps to Reproduce
I'm a bit confused right now... I have exactly the same structure of my app in StackBlitz, and the error does not occur there. Could this possibly have something to do with timings? Does this only happen in my app because there is significantly more data to load?
Prerequisites
Ionic Framework Version
v6.x
Current Behavior
ion-content has the following CSS variables:
The values are set dynamically by Ionic, depending on the height of the content of ion-header and ion-footer. So far, so good. However, this only works correctly sometimes, and other times it does not. For example, we have a page like this:
Since we assign a background image to our ion-content, the error in the incorrect offset calculation is very noticeable. When the appload event is fired again (
window.dispatchEvent(new Event('appload'));) afterward, ion-content will correct the offsets, and they will be accurate. See in this video:chrome_ACltntBpUu.mp4
Expected Behavior
By subsequently firing
window.dispatchEvent(new Event('appload'));with a timeout, there is a brief flickering, as the user briefly sees the black area. I would wish that in any case, ion-content always determines the correct offset values by itself and automatically.Steps to Reproduce
I'm a bit confused right now... I have exactly the same structure of my app in StackBlitz, and the error does not occur there. Could this possibly have something to do with timings? Does this only happen in my app because there is significantly more data to load?
Code Reproduction URL
https://stackblitz.com/edit/ionic6-angular13-jq74l5?file=src/app/features/feature-wallet/feature-wallet-overview/feature-wallet-overview.component.html
Ionic Info
Ionic:
Utility:
System:
Additional Information
Here's what I've tried to solve the problem:
I have created a lifecycle.service.ts:
app.component.ts
In ALL Views
As a result, the problem with the black bar occurs MUCH less frequently. However, it still happens occasionally.