nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

Home Page:https://ui.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug with switching modes "dark, light" on Safari in Dashboard UI-Pro template

shehab267 opened this issue · comments

Environment

  • Operating System: Darwin
  • Node Version: v18.16.0
  • Nuxt Version: 3.11.1
  • CLI Version: 3.11.0
  • Nitro Version: 2.9.4
  • Package Manager: npm@9.8.1
  • Builder: -
  • User Config: extends, devtools, ssr, runtimeConfig, modules, css, ui, app, pinia, i18n, veeValidate, plugins
  • Runtime Modules: @nuxt/ui@2.14.2, @nuxt/fonts@0.1.0, @vueuse/nuxt@10.9.0, @vee-validate/nuxt@4.12.6, @pinia/nuxt@0.5.1, @nuxtjs/i18n@8.2.0
  • Build Modules: -

Version

v2.15.2

Reproduction

https://dashboard-template.nuxt.dev/

Description

Summary:

On the Dashboard UI-Pro template, there is a bug with switching between light and dark modes on Safari (both desktop and mobile). When switching modes, buttons, fields change with the selected mode, but the background doesn't change unless the page is refreshed.

Steps to Reproduce:

  1. Open the Dashboard UI-Pro template on Safari.
  2. Switch between light and dark modes using the provided toggle buttons.
  3. Note that the buttons change with the selected mode, but the background doesn't change until the page is refreshed.

Expected Behavior:

The background should change immediately when switching between light and dark modes without requiring a page refresh.

Actual Behavior:

The background does not change when switching between light and dark modes unless the page is refreshed.

Additional Information:

  • This issue only occurs on Safari; it works fine on other browsers.

Additional context

screenshot_2024-05-06_at_20 23 39
screenshot_2024-05-06_at_20 23 48

dark-beforeReload
dark-afterReload
light-beforeReload

Logs

No response

Hi @shehab267 please try remove the HomeChart component from pages/index.vue and let me know if this issue still occurs?

Would you mind opening this issue in https://github.com/nuxt-ui-pro/dashboard? It's not related to @nuxt/ui.