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

Setting translucent="true" not working for ion-tab-bar

Open isaiahaguilera opened this issue 5 years ago • 23 comments

Bug Report

Ionic version:

[x] 4.0.2

Current behavior:

Setting translucent effect doesn't work on ion-tab-bar. Expected behavior:

"Frozen glass" effect on ion-tab-bar on iOS.

Steps to reproduce:

Setting ion-tab-bar with translucent="true" and adding content to the page to make it scrollable. Then test and see if you can see the content scrolling under the tab bar.

Related code:

<ion-tabs>

  <ion-tab-bar translucent slot="bottom" >
    <ion-tab-button tab="news">
      <ion-icon name="paper"></ion-icon>
      <ion-label>News</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab2">
      <ion-icon name="apps"></ion-icon>
      <ion-label>Tab Two</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="tab3">
      <ion-icon name="send"></ion-icon>
      <ion-label>Tab Three</ion-label>
    </ion-tab-button>
  </ion-tab-bar>

</ion-tabs>

Other information:

Ionic info:


Ionic:

   ionic (Ionic CLI)             : 4.10.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.2
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0

Capacitor:

   capacitor (Capacitor CLI) : 1.0.0-beta.17
   @capacitor/core           : 1.0.0-beta.17

System:

   NodeJS : v8.11.3 (/usr/local/Cellar/node@8/8.11.3_1/bin/node)
   npm    : 5.6.0
   OS     : macOS Mojave

isaiahaguilera avatar Mar 04 '19 16:03 isaiahaguilera

Hi there,

Thanks for the issue! Did you add fullscreen to your ion-content? If you did not, the content will not appear to scroll under headers/footers/tabbars.

See the docs here: https://ionicframework.com/docs/api/content#properties

Can you try this out, and let me know if you're still seeing this issue? Thanks!

liamdebeasi avatar Mar 04 '19 19:03 liamdebeasi

Yes I did. The translucent effect seems to work on the header fine. But it doesn't on the tab bar.

<ion-content fullscreen="true">
  <social-feed></social-feed>
</ion-content>

isaiahaguilera avatar Mar 04 '19 19:03 isaiahaguilera

Thanks for the follow up. Which browser/version are you testing this in?

liamdebeasi avatar Mar 04 '19 20:03 liamdebeasi

I am testing on an iPhone 6s Plus running IOS 12.1.4

isaiahaguilera avatar Mar 04 '19 21:03 isaiahaguilera

same issue

442623641 avatar Mar 05 '19 02:03 442623641

Hi there,

Thanks for the additional info! I setup an example using some of the code you provided but was unable to reproduce this issue. I attached a screenshot of what I can see below. Would you be able to provide a repository with the code required to reproduce this issue? Thanks!

simulator screen shot - iphone 6s plus - 2019-03-05 at 09 25 20

liamdebeasi avatar Mar 05 '19 14:03 liamdebeasi

@liamdebeasi I am not sure what the difference would be. One thing I forgot to mention is that I am actually installing the app with xcode and using capacitor. Maybe that could be the issue? Here is a repo that reproduces it for me: Repo

isaiahaguilera avatar Mar 05 '19 15:03 isaiahaguilera

Thanks for the repo! I was able to reproduce the issue you are describing. We will look into this!

liamdebeasi avatar Mar 05 '19 16:03 liamdebeasi

Sounds Great! Are there any work arounds that you know of?

isaiahaguilera avatar Mar 05 '19 18:03 isaiahaguilera

@liamdebeasi Any feedback for this issue? Still, it is not working? "@ionic/angular": "4.3.0",

@iaguilera14 Have you find out a workaround for this?

Sampath-Lokuge avatar May 04 '19 09:05 Sampath-Lokuge

@Sampath-Lokuge No I have not. I haven't used this feature yet. Waiting until it's fixed to implement. My app is still in development so I have been working around it for now.

isaiahaguilera avatar May 06 '19 15:05 isaiahaguilera

Same issue here. I dig into it and find out even with fullscreen content that content scroll not scroll under ther tabbar so there is no translucent for it.

quanganh206 avatar Jun 21 '19 03:06 quanganh206

I am having the same issue with Ionic 4.6.0

pauldunn avatar Jul 28 '19 11:07 pauldunn

As os @ionic/angular 4.11.7 this issue is still present in Capacitor apps.

startupfoundry avatar Jan 17 '20 22:01 startupfoundry

I am having the same issue on Ionic 5.2.1, a workaround i did is setting ion-tab-bar as absolute like this:

ion-tab-bar {
    position: absolute;
    bottom: 0;  
    left: 0;  
    width: 100%;  
}

TiagoDamascena avatar Jun 12 '20 15:06 TiagoDamascena

Having this issue too. @TiagoDamascena solution is not perfect, I have to manually add margin or padding for the screen to see the content behind the tab-bar.

cdes avatar Jun 30 '20 19:06 cdes

I've setup a codesandbox to demonstrate the issue: https://codesandbox.io/s/ionic-translucent-tab-bar-issue-41ocn

cdes avatar Jun 30 '20 19:06 cdes

having the same issue, any workarounds?

dnlaviv avatar Jan 19 '21 20:01 dnlaviv

Having the same issue. Translucent on headers works fine. On Tabbar - does not.

sharpcodepro avatar Jan 21 '21 12:01 sharpcodepro

having the same issue, any workarounds?

I haven't been able to find one.

isaiahaguilera avatar Jan 21 '21 17:01 isaiahaguilera

Thanks for the repo! I was able to reproduce the issue you are describing. We will look into this!

Something new here?

danielehrhardt avatar Jul 01 '21 11:07 danielehrhardt

still not working

nesha14586 avatar Dec 21 '21 22:12 nesha14586

any news? still not worked

St0necrusher avatar Sep 12 '22 12:09 St0necrusher

Can't believe this is still an issue, it's almost 2023. Would love for this to work properly.

ghost avatar Dec 12 '22 14:12 ghost

Can't believe this is still an issue, it's almost 2023. Would love for this to work properly.

Everyone would love for it to work!

nesha14586 avatar Dec 12 '22 14:12 nesha14586

Any news on when this will be finally fixed? Would really love this feature!

JanPhill avatar Apr 28 '23 09:04 JanPhill

By combining @TiagoDamascena's approach with some other CSS styling you get pretty close to the original blur effect

ion-tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.7);
}

Simply added the background-color to get more control over the blur

Worked for me!

ItzNicDev avatar Sep 03 '23 14:09 ItzNicDev

Hi everyone,

Here is a dev build with a proposed fix if anyone is interested in testing: 7.4.2-dev.11695832397.13fa6703

Install Example:

npm install @ionic/[email protected]

liamdebeasi avatar Sep 27 '23 16:09 liamdebeasi

Thanks for the issue. This has been resolved via https://github.com/ionic-team/ionic-framework/pull/28246, and a fix will be available in an upcoming release of Ionic Framework.

liamdebeasi avatar Oct 04 '23 19:10 liamdebeasi

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.

ionitron-bot[bot] avatar Nov 03 '23 20:11 ionitron-bot[bot]