Okay
  Public Ticket #4101370
Dark Mode Issue – Theme Not Updating Based on Device Setting
Closed

Comments

  • Samuele started the conversation

    Dear Support,

    I would like to report an issue related to the dark mode on the website. This problem also existed with the previous theme, but it was resolved after some updates.

    The issue is as follows:

    When I access the website using a mobile device (for example, an iPhone 14) with Safari and my system setting is set to dark mode, the website correctly loads in dark mode. So far, so good.

    However, if I later switch my device (whether it’s the same phone, a Mac, or another device) to light mode and revisit the website, the site does not update accordingly—it remains in dark mode. It seems to cache the dark theme and does not adapt dynamically to the new system setting.

    This behavior is not ideal. The website should immediately reflect the system’s current appearance setting (light or dark) upon each visit.

    Can you please provide urgent assistance with this?

    Thank you in advance.

    Best regards,

  •  317
    Theme Ruby replied

    Hi,

    Thank you for reaching out.

    To ensure that the website properly adapts to your system’s appearance settings, please make sure that the "Based on Browser" option is selected in the Dark Mode settings. This setting allows the site to automatically switch between light and dark modes based on the user's system preferences.

    For detailed guidance on how to configure this option, please refer to the following documentation:
    https://help.themeruby.com/foxiz/how-to-enable-dark-mode-feature/

    Should you need any further assistance, feel free to let us know.

    Best regards,

  • Samuele replied

    The setting has been correctly configured as per your suggestion — “Based on Browser” was enabled from the start. However, despite repeatedly clearing the cache, this issue still hasn’t been resolved.

    I have also carefully reviewed your detailed guide, but the problem persists. The device’s appearance mode is recognized only the first time a user visits the site. After that, if the device changes its appearance — for example, as with iPhones or macOS systems that switch to dark mode in the evening — the WordPress site does not update accordingly.

    I understand this might seem like a minor issue, but it can still be frustrating in certain situations.

    I invite you to test it yourself. You can visit my site and try it directly — you’ll see that the behavior is as I described:

    https://www.unaparolaperte.org

    Additionally, I’m attaching a screenshot where the “Based on Browser” setting is clearly shown as enabled.

    Attached files:  01.png

  •  317
    Theme Ruby replied

    Hi,

    Thank you for the information.

    We’ve just checked your website, and we noticed that the header still displays the light/dark mode toggle button. Please note that when the “Based on Browser” option is properly enabled, this toggle button should no longer appear.

    We recommend reviewing the settings again, there are two locations where the “Based on Browser” option should be applied. Please refer to the screenshot and double-check that both areas have been configured correctly.

    Best regards,

    Attached files:  Screenshot 2025-06-22 at 11.09.46.png
      Screenshot 2025-06-22 at 11.09.37.png

  • Samuele replied

    Thank you for your message.

    Yes, the “based on browser” setting is currently enabled. However, as you pointed out, when you change your device settings (e.g., enabling dark mode at the system level), the dark mode on the website does not automatically update or adapt accordingly.

    We understand your concern, and we appreciate your familiarity with the two areas shown in the screenshots. Regarding whether the toggle (switch) should be disabled: no, it should not be disabled.

    In fact, as you correctly mentioned, even if the site is configured to follow the browser or system preferences, the toggle should always remain available. This ensures that users can override the automatic setting and manually switch between dark and light modes if they prefer, regardless of their system configuration. This flexibility is important, as some users may want to use dark mode (or light mode) for reasons unrelated to their device settings.

    If previously, in your older themes, the switch worked as expected even when following the system settings, then ideally the current behavior should be aligned to that user-friendly approach.

    We will look into this further to ensure the expected behavior is preserved and that user preference is always prioritized.

    Please let us know if you have any further questions or feedback.

  •  317
    Theme Ruby replied

    Hi,

    It looks like your browser cached the page the first time you visited, so it’s holding onto that initial display mode rather than reloading your updated system preference. Could you try opening the site in a brand-new browser (or on a different device) with no prior cache? That way, on first load it will pick up your browser’s dark/light setting correctly.

    If the formatting issue still appears after clearing your cache and testing in an incognito window, could you please open a private support ticket with your site’s login details? That way, we can log in and take a closer look.

    Best regards,

  • Samuele replied

    Good morning!

    Yes, that’s exactly right — “the browser cached the page the first time it was visited, so it’s holding onto that initial display mode instead of updating based on the current system preference.” That’s precisely the issue I’ve been trying to point out.

    I’ve also tested this using other browsers like Safari and Firefox, and the problem still persists. In order for the site to recognize the current device state, I need to clear the cache and browsing history — but if I then change the system settings afterwards, the site doesn’t update accordingly. That’s the unusual behavior I’m referring to, which suggests that the WordPress theme isn’t responding properly.

    Many users might not even notice it, but from a professional standpoint, it’s quite significant.

    Can you help me find a solution to this?

  •  317
    Theme Ruby replied

    Hi,

    Thank you for your thorough testing and for sharing your observations. I have forwarded your suggestion to our development team so they can review the dark-mode functionality for any issues and optimize it in a future update.

    Please don’t hesitate to reach out if you have any further questions.

    Best regards,

  • Samuele replied

    Okay! Thank you. I’ll wait to hear from you.