Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddressbarColor Plugin: Different Behavior Android vs. iOS #17900

Open
54mu3l opened this issue Mar 13, 2025 · 0 comments
Open

AddressbarColor Plugin: Different Behavior Android vs. iOS #17900

54mu3l opened this issue Mar 13, 2025 · 0 comments
Labels
area/plugins bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@54mu3l
Copy link

54mu3l commented Mar 13, 2025

What happened?

I used the AdressbarColor Plugin as described in the docs (https://quasar.dev/quasar-plugins/addressbar-color).

I set the color in /src/boot/addressbar-color.js to #f00 with the following lines of code:

import { AddressbarColor } from 'quasar'

export default () => {
  AddressbarColor.set('#f00')
}

But on iOS 18 the adressbar was white (instead of red).

Reason for this problem is, that Quasar sets the meta tag apple-mobile-web-app-status-bar-style which only supports default, black, and black-translucent.

<meta name="apple-mobile-web-app-status-bar-style" content="#f00">

What did you expect to happen?

I would expect the adressbar to be red (#f00).

For this to happen I would expect Quasar to set the meta tag theme-color (instead of apple-mobile-web-app-status-bar-style) which is fully support since Safari for iOS version 15.

<meta name="theme-color" content="#f00">

Reproduction URL

https://stackblitz.com/edit/quasarframework-stackblitz-templates-tkkdnwdc?file=src%2Fboot%2Faddressbar-color.ts

How to reproduce?

Generally speaking:

  1. Set the addressbar color to red with $q.addressbarColor.set('#f00')
  2. Open the page on an iPhone
  3. The adressbar won't be red

With the provided stackblitz:

  1. Open the provided stackblitz
  2. Simulate an iPhone (with dev-tools)
  3. Check the generated html code and see that apple-mobile-web-app-status-bar-style is set
  4. Simulate a Pixel 7 (with dev-tools)
  5. Check the generated html code and see that theme-color is set

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Plugins (quasar)

Platforms/Browsers

iOS

Quasar info output

Operating System - Linux(5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36) - linux/x64
NodeJs - 18.20.3

Global packages
  NPM - 10.2.3
  yarn - 1.22.19
  pnpm - 8.15.6
  bun - Not installed
  @quasar/cli - undefined
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.18.1 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 2.1.4 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.17 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.5.13 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.5.0
  pinia - Not installed
  vite - 6.2.1 -- Native-ESM powered web dev build tool
  vite-plugin-checker - Not installed
  eslint - 9.22.0 -- An AST-based pattern checker for JavaScript.
  esbuild - 0.25.1 -- The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.
  typescript - Not installed
  workbox-build - Not installed
  register-service-worker - Not installed
  electron - Not installed
  @electron/packager - Not installed
  electron-builder - Not installed
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - quasarframeworkstackblitztempl-cy3h
  en0 - 192.168.1.104

Relevant log output

Additional context

I provided a GIF that shows the different behavior of theme-color vs. apple-mobile-web-app-status-bar-style on iOS 18. For demo purposes I edited the index.html directly without the use of the addressbar plugin (screen recording using iPhone mirroring):

Image

I would argue the behavior should be the same for Android and iOS. As far as I can see, I don't see any reason why not to use theme-color for every device.

See also: https://stackoverflow.com/a/69699288/4251427

@54mu3l 54mu3l added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Mar 13, 2025
@github-actions github-actions bot added area/plugins bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/plugins bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

1 participant