Skip to content

Conversation

@johann9898
Copy link

@johann9898 johann9898 commented Dec 19, 2025

Platforms affected

IOs

Motivation and Context

iOS 26 introduced the new “Liquid Glass” appearance, which caused the InAppBrowser tool bar to become transparent and top bar buttons to appear translucent.
This change fixes that issue.

image image

Description

This PR fixes the top bar “Liquid Glass” issue on iOS 26+ that to have background color of the tool bar same as the _browserOptions.toolbarcolor

Testing

Tested this by adding the changes of this plugin in to the app

Tested the top bar with default with toolbar in the bottom

Screenshot 2025-12-20 at 18 01 21 Screenshot 2025-12-20 at 18 04 24 image

The color might be slightly off by the brightness of the color to the one without the liquid glass

@erisu erisu changed the title Topbar - Fix liquid glass problem fix(ios): topbar liquid glass Dec 19, 2025
self.closeButton.enabled = YES;

// Fixes the Liquid Glass issue on iOS version >= 26 where the buttons have a translucent background
if (@available(iOS 26.0, *)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe these checks are sufficient as it assumes that the environment is running at least XCode 26 and Cordova iOS framework declares support for XCode 15 and later.

There is a way to do a preprocessor check that is more resilient to the XCode environment, I just don't recall the exact syntax for that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The preprocessor check might be this, but I don’t remember exactly.

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 260000
    if (@available(iOS 26.0, *)) {
        self.closeButton.hidesSharedBackground = YES;
    }
#endif

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, i will add the preprocessor check too

@diogenesricardo
Copy link

The clipboard buttons are also a problem; I am working to figure out how to fix them.

@GitToTheHub
Copy link

@johann9898 By default, the toolbar is shown at the bottom. Please keep this also in mind, when you test your changes.

@GitToTheHub
Copy link

Your changes do not work, when showing the in-app browser over a webview with a green background with default settings. Also the toolbar background is not set by default to semi-transparent:

image

Without your changes it would like this:

image

@GitToTheHub
Copy link

I created an issue, which give all details about this issue: #1098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants