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: ion-nav-bar hide-nav-bar="true" affects all views

See original GitHub issue

Type: <span ionic-type>bug</span>

Platform: <span ionic-platform>all</span>

<span ionic-description>The has-header class is added/removed from all views during transition, not just from the view with the hidden header.

This causes a layout call to a view that shouldn’t be affected.

This issue can be seen easily here: http://codepen.io/mhartington/pen/qEgRLK

When “Scientific facts” is clicked, the content of the Home view “jumps” up as its padding is removed.

has-header should continue to be applied to views that do not have hide-nav-bar=“true”.

To work around this in the short term, I’ve used these CSS rules:

/* Work around issue with flickering while showing/hiding the nav bar */
ion-nav-view ion-view:not([hide-nav-bar="true"]) ion-content {
    top: 44px;
}
ion-nav-view ion-view[hide-nav-bar="true"] ion-content {
    top: 0;
}
.platform-ios.platform-cordova:not(.fullscreen) ion-nav-view ion-view:not([hide-nav-bar="true"]) ion-content {
    top: 64px;
}
.platform-ios.platform-cordova:not(.fullscreen) ion-nav-view ion-view[hide-nav-bar="true"] ion-content {
    top: 22px;
}
</span>

<span is-issue-template></span>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kas84commented, Mar 14, 2017

Same problem here!

My workaround was using hide-nav-bar=true in all subsequent views and handling the back button myself. Seems to work pretty well.

1reaction
bklusekempercommented, Oct 17, 2016

I also experience this issue! Please reopen!

Read more comments on GitHub >

github_iconTop Results From Across the Web

bug: ion-nav-bar hide-nav-bar="true" affects all views ... - GitHub
My workaround was using hide-nav-bar=true in all subsequent views and handling the back button myself. Seems to work pretty well.
Read more >
hide-nav-bar hides nav-buttons too. I want to retain the view ...
1 Answer 1 ... $rootScope.hideBar = true;. This will make only your bar total trasparent. Buttons and other things will remain visible on ......
Read more >
How to hide nav-bar with tabs in Ionic 2?
I have tried hide-nav-bar=“true” but it does not work. ... in the “ion-navbar-section” , it will effect on every tab and it's subpage....
Read more >
ionic-v1.x - Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
Show ion-nav-buttons position based on a scope variable
I have an application that work in LTR or RTL mode, and im trying to update the menu to reflect the direction, so...
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