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.

bug: footer safe area padding applied with nested tabs

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

Some time ago it was introduced to remove the bottom padding of the safe area on footer toolbar when the keyboard is open or it is in bottom-tabs (#25746), which is 100% correct, but i found a bug in a special case.

Let’s say you have two tabs, the first one has another tabs on the top, the second one has a footer where the correct style should be applied. It seems like the const tabs = this.el.closest('ion-tabs'); in the second tab is returning the inner tabs of the first tab page and don’t apply the styles then because it has a slot top

Expected Behavior

The footer-toolbar-padding should not be applied. It should check the correct tabs and not the inner tabs of another outer tab

Steps to Reproduce

See attached repo:

  1. ionic serve
  2. Tab 1 is loaded
  3. Go to tab 2 (The custom applied --ion-safe-area-bottom) is added while it should not

Code Reproduction URL

https://github.com/EinfachHans/ionic-footer-bug

Ionic Info

Ionic:

Ionic CLI : 6.20.1 (/Users/hans/.nvm/versions/node/v16.14.2/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 6.2.6 @angular-devkit/build-angular : 14.2.2 @angular-devkit/schematics : 14.2.2 @angular/cli : 14.2.2 @ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 4.2.0 @capacitor/android : not installed @capacitor/core : 4.2.0 @capacitor/ios : not installed

Utility:

cordova-res (update available: 0.15.4) : 0.15.1 native-run : 1.7.0

System:

NodeJS : v16.14.2 (/Users/hans/.nvm/versions/node/v16.14.2/bin/node) npm : 8.6.0 OS : macOS Monterey

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
EinfachHanscommented, Sep 12, 2022

works 😊

0reactions
ionitron-bot[bot]commented, Oct 13, 2022

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

Supporting safe areas | React Navigation
The area not overlapped by such items is referred to as "safe area". We try to apply proper insets on the UI elements...
Read more >
SafeAreaView - React Native
SafeAreaView renders nested content and automatically applies padding to reflect the portion of the view that is not covered by navigation bars, ...
Read more >
Tabs - Lightning Design System
Because tab sets can be nested, pay close attention to the markup. They are constructed to prevent styles from leaking from parent tab...
Read more >
How to remove the padding around ion-item? - Stack Overflow
One issue that I had is that I was putting these on an inner (child) element and these need to go on the...
Read more >
Positioning content relative to the safe area - Apple Developer
Use safe areas as an aid to laying out your content. Each view has its own layout guide (accessible from the safeAreaLayoutGuide property)...
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