Fix flicker on page load when color mode is set to dark #15340
Labels
severity: low
Does not significantly disrupt application functionality, or a workaround is available
status: accepted
This issue has been accepted for implementation
topic: UI/UX
User interface or user experience related work
type: bug
A confirmed report of unexpected behavior in the application
Milestone
Deployment Type
NetBox Cloud
NetBox Version
v4.0
Python Version
3.11
Steps to Reproduce
Expected Behavior
The application of the dark mode theme should persistent without interruption between page loads.
Observed Behavior
A "flicker" is sometimes visible when a new page loads, as the DOM is initially rendered in light mode and then switched to dark mode. This occurs because the user's preferred theme is being read from local storage after the DOM has finished loading.
Note that this does not occur when authenticated as a known user with the color preference set to dark mode. (In this case,
data-bs-theme="dark"
is set on each page's<body>
tag directly in the page source.)The text was updated successfully, but these errors were encountered: