Skip to content

fix(ios): topbar liquid glass#1097

Closed
johann9898 wants to merge 12 commits intoapache:masterfrom
landsbankinn:topbar-fix
Closed

fix(ios): topbar liquid glass#1097
johann9898 wants to merge 12 commits intoapache:masterfrom
landsbankinn:topbar-fix

Conversation

@johann9898
Copy link
Copy Markdown

@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
Comment thread src/ios/CDVWKInAppBrowser.m Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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

@GitToTheHub
Copy link
Copy Markdown
Contributor

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

@GitToTheHub
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@johann9898 johann9898 requested review from breautek and erisu January 29, 2026 13:42
@johann9898
Copy link
Copy Markdown
Author

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

I've fixed the InAppBrowser bottom toolbar by adding a semi-transparent background and making it work correctly with the safe area.

@GitToTheHub
Copy link
Copy Markdown
Contributor

Hi @johann9898,

thanks for your changes. I will see what are the best changes for the layout issues and will keep your PR in mind.

GitToTheHub added a commit that referenced this pull request Mar 27, 2026
- Since iOS 26 the toolbar's background is not configurable anymore. To achieve this, a custom toolbar background is added, which is also used on iOS 18 and older to keep the code simple.
- The toolbar gets a white semi-transparent background by default, which can be overridden. On iOS 18 and older it was dark semi-transparent before, which was changed.
- Constrain the WebView top to the top edge rather than to the safe area top, which made a transparent gap in the top safe area before.
- Fixes the toolbar is glued at the top on landscape
- doc(readme): change some wording for iOS option `toolbartranslucent`
- Removed some unnecessary assigned properties to address bar and toolbar
- Use always [NSLayoutConstraint activateConstraints:]

* fix(ios): propery styling of address label
- Address bar: Text is black by default and the background transparent white
- Add background view for address label, so the address label can have margins when a background is set
- Add semi-transparent background with round corners

* fix(ios): use auto layout margin and spacing

- Instead of using a custom approach it's better to use the tools which should be used for auto layoit
- For margins use the `layoutMarginsGuide`
- For spacing use `constraintEqualToSystemSpacingBelowAnchor:`

- Overseeds fix(ios): topbar liquid glass #1097
- Fixes iOS: Toolbar background transparent and not changeable since iOS 26 #1098
- Fixes iOS26 Liquid Glass issue #1087

Generated-By: GPT-5, XCode 26
@GitToTheHub
Copy link
Copy Markdown
Contributor

This is fixed by #1132. Thank you anyway for your PR!

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