apache / cordova-plugin-inappbrowser

Apache Cordova InAppBrowser Plugin
https://cordova.apache.org/
Apache License 2.0
1.12k stars 2.15k forks source link

iOS Location bar is transparent #870

Open Heshyo opened 3 years ago

Heshyo commented 3 years ago

Bug Report

Problem

On iOS, the location bar is transparent, meaning the app is visible behind.

What is expected to happen?

The location bar has the same background color as the toolbar, hiding the app behind and making the visited URL visible.

What does actually happen?

The location bar is transparent.

InAppBrowserIssue

The green rectangle shows the location bar. It's transparent, and as the background of the app is white, just like the location, the location isn't visible.

Changing toolbarcolor or toolbartranslucent doesn't have any effect on the location

Information

I don't know if this is linked with https://github.com/apache/cordova-plugin-inappbrowser/issues/801 as it's reported to be caused by the notch. I've tested it on real devices with notch, as well as in the simulator on an iPhone 8 that has no notch, and I always have the issue.

Looking at the code it seems normal that this issue occurs, as the label has a transparent background color.

Doing the following fixes my issue mostly

self.addressLabel.backgroundColor = [UIColor blackColor];

This only mostly fixes the issue because

Command or Code

cordova.InAppBrowser.open('https://github.com', '_blank', 'location=yes,closebuttoncaption=Fermer');

Environment, Platform, Device

System:

   ios-deploy : 1.11.3
   ios-sim    : 8.0.2
   NodeJS     : v14.15.4 (/Users/user/.nvm/versions/node/v14.15.4/bin/node)
   npm        : 6.14.10
   OS         : macOS Big Sur
   Xcode      : Xcode 12.3 Build version 12C33

Version information

Ionic:

   Ionic CLI                     : 6.13.1 (/Users/user/.nvm/versions/node/v14.15.4/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.6.3
   @angular-devkit/build-angular : 0.1102.5
   @angular-devkit/schematics    : 11.2.5
   @angular/cli                  : 11.2.5
   @ionic/angular-toolkit        : 3.1.1

Cordova:

   Cordova CLI       : 10.0.0
   Cordova Platforms : ios 6.2.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 17 other plugins)
                                 cordova-plugin-inappbrowser 5.0.0

Utility:

   cordova-res : 0.15.3
   native-run  : 1.3.0

Checklist

nosTa1337 commented 3 years ago

same here. using iOS 14.5

I have the problem on simulator with notch and real iPhone without notch.

Maks113 commented 3 years ago

same issue on iPhone 11 ios 14.7

Qlfvr commented 3 years ago

Hello, I arrive here from #801 . I am having a similar issue even with hideurlbar=yes. (iOS 14.7.1 ; iPhone 8; using ionic 5)

bhandaribhumin commented 3 years ago

@Qlfvr @Maks113 I observe URL bar is present but we have to change the font colour for the visible font, problem: bar colour is the same as the URL text font colour which is white!

codeconsole commented 3 years ago

https://github.com/apache/cordova-plugin-inappbrowser/issues/901

tdfeslo commented 2 years ago

Hi. Is there any news about this problem? Is a fix planned? Thanks

Amal9562 commented 2 years ago

i think we need to fork this plugin and edit CDVWKinAppbrowser.m => self.addressLabel.backgroundColor at the line 859 to = [UIColor Black]; and just make the build on ios will be set url bar background to black. when ever we make the build it automaticaly fetch details from the main plugin branch from git so our customised code from the project can do nothing .just try it

jmalfatto commented 2 years ago

Hi. Is there any news about this problem? Is a fix planned? Thanks

Same question

mvaljento commented 1 year ago

The issue seems to still persist. Tested on emulator, iPhone 14, iOS 16.2.

"cordova-plugin-inappbrowser": "^5.0.0"

@capacitor/cli: 4.6.3 @capacitor/core: 4.6.3 @capacitor/android: 4.6.3 @capacitor/ios: 4.6.3

openjdk version "19.0.2" 2023-01-17 OpenJDK Runtime Environment Homebrew (build 19.0.2) OpenJDK 64-Bit Server VM Homebrew (build 19.0.2, mixed mode, sharing)

jdinse commented 1 year ago

I changed to themeablebrowser instead, which allows me more styling options. Works great! For example you can use this fork:

https://github.com/mlearnbr/cordova-plugin-themeablebrowser

codinglife456 commented 1 year ago

This issue still exist as of 12/5/2023 for IOS device version 15