Skip to content

fix: Stop iOS 26+ from blurring the navigation bar of the installed app - #16

Merged
ItHasU merged 1 commit into
mainfrom
fix/ios-liquid-glass-blur
Sep 26, 2026
Merged

ItHasU merged 1 commit into
mainfrom
fix/ios-liquid-glass-blur

Conversation

@ItHasU

@ItHasU ItHasU commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Le problème

Une fois l'app installée sur l'écran d'accueil, iOS 26 et suivants dessinent l'effet de bord de défilement de Liquid Glass par-dessus le haut de la vue web. Sur iOS 27, il descend assez bas pour flouter la barre de navigation.

La #14 partait d'une mauvaise hypothèse. Elle a passé apple-mobile-web-app-status-bar-style à black, et la barre est restée floue une fois déployée, avec l'app réinstallée. Aucune balise meta ni propriété CSS ne désactive cet effet.

Le correctif

WebKit renonce à l'effet quand une boîte fixed ou sticky, avec une couleur de fond, couvre le bord supérieur (plus de 10 px de haut, au moins 90 % de la largeur), et utilise alors cette couleur à la place.

  • Cadre fixe. Toute l'app est maintenant dans un tel cadre : une div en position-fixed qui couvre l'écran et reprend la mise en page flex que portait body. Rien ne bouge.
  • Une div, pas le body. Le fond de body est reporté sur le canevas, et body lui-même se retrouve alors sans fond : WebKit ne le prendrait pas en compte.
  • Couleurs. Le cadre prend la couleur de la barre de navigation, pour que la teinte qu'iOS met sous l'heure raccorde avec elle. #pageDiv reçoit explicitement le fond de page, pour que les pages gardent le leur.
  • Retour sur la fix: Opaque status bar for the app installed on the iOS home screen #14. La balise revient à black-translucent : elle n'a aucun effet sur le flou, et le commentaire ajouté avec elle affirmait le contraire.

Vérifications

Dans Chromium, en mobile (390×844) et en bureau (1280×800), en comparant la build de main à celle de cette branche :

  • barre de navigation et #pageDiv exactement à la même position et à la même taille ;
  • mêmes couleurs, rendu identique à l'œil ;
  • le défilement se fait toujours dans #pageDiv, jamais dans le document ;
  • une superposition position: fixed; z-index: 1050 ajoutée à body, comme l'aperçu plein écran ou les modales, reste bien au-dessus ;
  • dans le DOM, le cadre remplit la condition de WebKit : fixed, en haut de l'écran, toute la largeur et toute la hauteur, fond opaque.

Pas de conflit avec feat/web-push (vérifié avec git merge-tree).

Non vérifié sur iOS : pas d'iPhone ni de simulateur iOS dans mon environnement. La condition de WebKit vient de Registrum#6, qui a appliqué la même approche (cadre fixed inset-0 avec fond) et l'a validée dans le simulateur iOS 27. Les projets qui ont changé la balise meta, comme la #14, ne l'avaient pas vérifié sur iOS 27.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Ezfcpkv2np5PkGwck9TSHY


Generated by Claude Code

Installed on the home screen, iOS 26 and later draw the Liquid Glass
scroll edge effect over the top of the web view. On iOS 27 it reaches far
enough to wash out the navigation bar. No meta tag nor CSS property turns
it off : #14 switched apple-mobile-web-app-status-bar-style to black, and
the bar stayed blurred once deployed and the app reinstalled.

WebKit skips the effect when a fixed or sticky box with a background
colour covers the top edge (taller than 10px, at least 90% of the width),
and uses that colour instead. The whole app now sits in such a frame :
a fixed div covering the screen, which takes over the flex layout the
body had, so nothing moves. It is a div and not the body : the background
of the body is moved to the canvas, and the body itself then has none.

The frame has the colour of the navigation bar, so the colour iOS extends
under the clock matches it. #pageDiv gets the page background explicitly,
so the pages keep theirs.

The status bar style of #14 is reverted to black-translucent : it has no
effect on the blur, and the comment it came with said the opposite.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Ezfcpkv2np5PkGwck9TSHY
@ItHasU
ItHasU merged commit 5331a21 into main Sep 26, 2026
Yoonwoo-Ha added a commit to Yoonwoo-Ha/herdr-web-ui that referenced this pull request Sep 28, 2026
The previous commit dropped `black-translucent` so that the page would
not draw under the status bar. That is not enough: on an iPhone the
header of the home-screen app was still blurred (Safari's tab was
not), and other apps report the same after going opaque and
reinstalling (ItHasU/eurekai#16). iOS lays its Liquid Glass scroll
edge effect over the top of an installed web app whatever the status
bar style, and skips it only when a fixed or sticky box with a
background covers that edge, taking that box's color instead.

The header (opaque --bg-panel, full width, above the scroll areas) is
now `position: sticky; top: 0`. Nothing scrolls it, so the layout is
unchanged (element boxes identical to main at phone and desktop
sizes). The status bar meta is back to `black-translucent`, so the
header still runs under the clock and no reinstall is needed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
devswha added a commit to devswha/ovis that referenced this pull request Sep 28, 2026
…106)

## Problem

On an iPhone, the **home-screen app's header was blurred**: the title,
the Chat/Terminal switch and the icons. The same page in a Safari tab
was sharp.

## Cause

Since iOS 26, an installed web app gets the Liquid Glass *scroll edge
effect* laid over the top of the page, and it reaches into our header.

- There is no CSS or meta switch to turn it off.
- WebKit skips it only when a **fixed or sticky box with a background**
covers the top edge (more than about 10 px tall, at least 90% of the
width). It then uses that box's color instead.

## Fix

- `.app-header` is now `position: sticky; top: 0`.
- It is already an opaque (`--bg-panel`), full-width bar at the top
edge, and nothing scrolls it, so the layout does not change.
- It runs under the clock through the `safe-area-inset-top` padding, so
iOS takes its color there.
- The status bar meta stays `black-translucent`, so an existing
home-screen install needs no reinstall.

The first version of this PR removed `black-translucent` instead, as
amir20/dozzle#5222 did. That is not enough on its own: ItHasU/eurekai#16
still saw the bar blurred after going opaque and reinstalling, and fixed
it with a fixed box at the top. This PR now takes that approach, and
`index.html` is unchanged.

## Tests

- Headless Chrome, iPhone 13 and 1280×900 viewports, `main` against this
branch: every box in the header, `.app-body`, `.sidebar` and the
composer is at the same position and size. The only differences are two
text spans whose temp-folder names differ in length.
- `tsc --noEmit`, `bun test src`.
- Not yet checked on an iPhone. I'll report back from the device that
showed the blur.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Yoonwoo-Ha <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: Hako <[email protected]>
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.

2 participants