ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bugs - ion-nav-back-button "hide" class, ion-nav-bar set to "invisible" class in Google

Open lwenke opened this issue 12 years ago • 22 comments

Closed issues about this:

https://github.com/driftyco/ionic/issues/1017 https://github.com/driftyco/ionic/issues/1018

http://forum.ionicframework.com/t/bug-ion-nav-bar-set-to-invisible-class-in-chrome-for-2-starter-apps/2572/3 dk​01 wrote: "I am having this same exact issue. My app works fine in Firefox, Safari, the IOS Simulator. It fails in Chrome. I see the invisible class as well....."

http://forum.ionicframework.com/t/bug-ion-nav-back-button-set-to-hide-class-in-chrome-for-2-starter-apps/2571/3 fred​pmc wrote: "I am on Chrome Version 34.0.1847.116 and it is not working."

In 1018 ajoslin wrote: "Seems like it may be a different error; perhaps due to a problem in your application or a plugin in Chrome."

I am using unedited starter apps - the tabs and sidemenu starter apps so I'm not adding my own bug to it.

The only plugins I'm using is AngularJS Batarang and AdBlock.

BTW the error involves two classes appearing amongst the code - "hide" and "invisible" on ion-nav-back-button and ion-nav-bar.

So I'm saying that ajoslin's theory doesn't explain why those classes are appearing in the ionic directives.

lwenke avatar Apr 09 '14 16:04 lwenke

Could you remove your plugins and see how it works? I'm not able to reproduce this, unfortunately.

ajoslin avatar Apr 09 '14 16:04 ajoslin

At the moment things are working but I've asked those two people on the forums to post here. BTW I added "hide" to the back button HTML and "invisible" to the nav-bar. They seem to be defined in ionic.css lines 6147

.invisible { visibility: hidden; }

And 6127

/**

  • Utility Classes

*/ .hide { display: none; }

lwenke avatar Apr 09 '14 16:04 lwenke

The hide and invisible classes are supposed to be applied at the proper times when the navbar is hidden, or the back button is hidden. However, I am unfortunately unable to get them to apply to the elements in the cases you mention.

ajoslin avatar Apr 09 '14 16:04 ajoslin

Having this issue as well. Adds an invisible class to ion-nav-bar on load, also adds a disable-user-behavior class

`

  • {{item.text}}
`

I'm loading this view using an ng-include tag if that helps.

thoughtpalette avatar Apr 09 '14 21:04 thoughtpalette

Could you try with the nightly build?

http://code.ionicframework.com/#nightly

ajoslin avatar Apr 09 '14 21:04 ajoslin

Unable to reproduce on Chrome Version 34.0.1847.116

issue 1088

With Beta 1 or Nightly

calendee avatar Apr 10 '14 12:04 calendee

Also having this issue -- 'hide' and 'disable-user-behavior' classes are added to the ion-nav-back-button.

My code:

<ion-nav-bar class="bar-dark">
    <ion-nav-back-button class="button-icon">
    <i class="ion-chevron-left"></i>
    </ion-nav-back-button>
    <h1 class="title">{{ conversations[cId].contactDisplayName }}</h1>
</ion-nav-bar>

Renders as: screen shot 2014-04-25 at 4 55 29 pm

No special plugins, etc. Not using the nightly.

ianlyons avatar Apr 25 '14 23:04 ianlyons

If I recall, I had this issue and ended up being able to fix it by removing the Angular Batarang extension. It was preventing the loaded event from firing properly and thus the classes were never getting removed properly.

jimthedev avatar Apr 28 '14 14:04 jimthedev

I confirm this. The reason in Chrome extension Angular Batarang.

outbreak avatar Apr 28 '14 14:04 outbreak

It should be fixed now with Batarang.

ajoslin avatar Apr 30 '14 17:04 ajoslin

I am using the nightly. I've never installed Batarang. I also have this issue. In fact, it doesn't work in Safari or Firefox. I've disabled all my chrome extensions. Puzzled.

s2young avatar May 20 '14 04:05 s2young

@s2young can you post a fiddle of what code you are using?

jimthedev avatar May 20 '14 11:05 jimthedev

I'm afraid the issue must be in the router so I'm not sure I can encapsulate very easily. It would be helpful to understand where in the event cycle the nav gets hidden. I'm checking auth in the $stateChangeStart, though I'm not calling preventDefault or anything.

If I replace ion-nav-bar with ion-header-bar it shows up just fine.

Thanks

s2young avatar May 20 '14 13:05 s2young

If you inspect the element, is the nav bar there and if so, does it have a class of invisible?

jimthedev avatar May 20 '14 14:05 jimthedev

Yes it is there and invisible. On May 20, 2014 9:30 AM, "jcummins" [email protected] wrote:

If you inspect the element, is the nav bar there and if so, does it have a class of invisible?

— Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/1088#issuecomment-43633227 .

s2young avatar May 20 '14 14:05 s2young

@s2young in what situation is the back button not showing? Is it always not showing or only in some situations? It may be that it is intentionally being hidden by the nav system due to the way you are changing states.

ajoslin avatar May 20 '14 14:05 ajoslin

The entire nav bar isn't showing. I also commented out all the $stateChangeStart code. Still invisible.

The 'disable-user-behavior ' class is also present in the nav-bar class.

Andrew Joslin mailto:[email protected] May 20, 2014 at 9:31 AM

@s2young https://github.com/s2young in what situation is the back button not showing? Is it always not showing or only in some situations? It may be intentionally being hidden by the nav system due to the way you are changing states.

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/1088#issuecomment-43633410.

s2young avatar May 20 '14 15:05 s2young

Are you using an ion-view element around your content?

The ion-view element is what communicates between the content, the view history, and the navbar.

On Tue, May 20, 2014 at 9:34 AM, Stuart Young [email protected]:

The entire nav bar isn't showing. I also commented out all the $stateChangeStart code. Still invisible.

The 'disable-user-behavior ' class is also present in the nav-bar class.

Andrew Joslin mailto:[email protected] May 20, 2014 at 9:31 AM

@s2young https://github.com/s2young in what situation is the back button not showing? Is it always not showing or only in some situations? It may be intentionally being hidden by the nav system due to the way you are changing states.

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/1088#issuecomment-43633410.

— Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/1088#issuecomment-43642242 .

ajoslin avatar May 20 '14 15:05 ajoslin

No, I wasn't. I think I've got it now. Thanks very much!

Your first example here, http://ionicframework.com/docs/api/directive/ionNavBar/, doesn't mention the ion-view element at all. The second one does. It would be helpful to have a more fully fleshed-out usage example.

Thanks again!

Andrew Joslin mailto:[email protected] May 20, 2014 at 10:50 AM Are you using an ion-view element around your content?

The ion-view element is what communicates between the content, the view history, and the navbar.

On Tue, May 20, 2014 at 9:34 AM, Stuart Young [email protected]:

The entire nav bar isn't showing. I also commented out all the $stateChangeStart code. Still invisible.

The 'disable-user-behavior ' class is also present in the nav-bar class.

Andrew Joslin mailto:[email protected] May 20, 2014 at 9:31 AM

@s2young https://github.com/s2young in what situation is the back button not showing? Is it always not showing or only in some situations? It may be intentionally being hidden by the nav system due to the way you are changing states.

— Reply to this email directly or view it on GitHub

https://github.com/driftyco/ionic/issues/1088#issuecomment-43633410.

— Reply to this email directly or view it on GitHubhttps://github.com/driftyco/ionic/issues/1088#issuecomment-43642242

.

— Reply to this email directly or view it on GitHub https://github.com/driftyco/ionic/issues/1088#issuecomment-43644362.

s2young avatar May 20 '14 18:05 s2young

Thanks @s2young, good feedback. We're working on improving our examples right now.

ajoslin avatar May 20 '14 18:05 ajoslin