Skip to content

bug: Ion-content does not take footer into height calculation #19146

@riffbyte

Description

@riffbyte

Bug Report

Ionic version:
[x] 4.7.4
Ionic React version:
[x] 4.8.0-rc.0

Current behavior:
After updating to latest version of @ionic/core and @ionic/react, IonFooter on all of my pages got pushed down by IonContent, which doesn't account for footer below it.
The issue is present on both iOS and MD styles, desktop and mobile.

Adding display: flex; flex-direction: column to <IonRouterOutlet> component fixes this.

On the left: current behavior. On the right: expected behavior.
bug

Expected behavior:
IonContent should accompany both IonHeader and IonFooter when calculating its height.

Steps to reproduce:
Start a new Ionic React app with sidemenu template.
Add the footer after IonContent in scr/pages/Home.tsx

<IonFooter>
    <IonToolbar>
        <IonTitle>Footer</IonTitle>
    </IonToolbar>
</IonFooter>

Additional information
This is probably a duplicate of #15799
But this issue wasn't present on previous versions of @ionic/react (0.0.7)

Ionic info:

Ionic:

   Ionic CLI       : 5.2.3 (C:\Users\sato\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework : @ionic/react 4.8.0-rc.0

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions