nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
3.97k stars 499 forks source link

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

Closed shehab267 closed 5 months ago

shehab267 commented 5 months ago

Environment

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:

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

moshetanzer commented 5 months ago

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

benjamincanac commented 5 months ago

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

benjamincanac commented 5 months ago

Closing in favor of https://github.com/nuxt-ui-pro/dashboard/issues/22.