8

Currently, I use iOS Orion with Dark Reader for dark mode, and when I open a new tab, the page always flashes white before turning dark. Since I use Orion at night in dark mode, it feels like my phone is throwing a flashbang in the dark đŸ˜”â€đŸ’«.

This issue was reported in the forum as early as 2021 but has yet to be resolved. I began reviewing the reports related to this bug on the forum, as well as Dark Reader's help documentation. Here's Dark Reader's explanation:

Screen flashes white when opening a new tab or navigating to a website
Before loading a website, the browser shows a theme background color by default. Select a dark theme in your browser settings.

This means that the bug is not caused by the extension itself, and Dark Reader works correctly in Orion after several updates. Dark Reader suggests that this issue can be solved by switching the browser to a dark theme. So I tested this in Safari:

After enabling the system-wide dark mode, Safari switched to dark mode along with the device. I found that even with the dark mode extension disabled, when opening a new webpage or tab, the initial page still renders in dark mode before switching to light mode if necessary. This led me to conclude that Safari behaves in such a way that even without any extension interference, it renders the initial page in dark mode when the device is in dark mode. In contrast, Orion, when in dark mode, immediately renders the new tab or webpage in light mode.

There are several forum reports about this bug, most stating that the white flash is due to Dark Reader’s loading delay, causing the page to flash white initially. Some have also suggested that Orion should natively support webpage dark mode.

I believe a potential solution to this bug could be for iOS Orion to follow Safari’s approach. That is, if the device is in dark mode, the browser should initially render the page in dark mode when opening a link, leaving the subsequent rendering to the extension. If the user hasn’t enabled a dark mode extension (such as Dark Reader), the page would naturally switch to light mode afterward. However, if a dark mode extension is enabled, the browser would first render the page in dark mode, and then the extension would take over the rendering in dark mode. This way, users won’t experience the sudden white flash when opening links at night. As for users who don't use dark mode, this fix won’t affect them, as the rendering is based on the browser’s dark mode, which they wouldn’t have enabled. This rendering occurs only when the page loads, and the short rendering time, depending on internet speed and the page’s load time, shouldn’t slow down the page.

    I’m aware that based on current feedback, Orion has already begun planning to integrate dark mode natively, and many users support this suggestion.

    However, I believe that dark mode should be handled by extensions. Many websites are too complex for simple dark mode solutions to cover all elements effectively. Building a fully native dark mode for a browser requires the browser to deeply modify every webpage’s CSS, ensuring compatibility with countless different designs, themes, and interactive elements. This can introduce significant maintenance challenges, as the browser would need to constantly adjust its rendering for various sites. It would also struggle to handle more complex or poorly coded websites, potentially resulting in a subpar user experience. This complexity is evident from the popular Dark Reader extension’s GitHub issues, where numerous reports on website compatibility are submitted daily.

    I think extensions should handle the webpage’s dark mode, and the browser (Orion) should only assist the extension in fixing the white flash bug when opening links. Dark Reader, as the most widely-used dark mode extension, has been stable and frequently updated for years, providing good compatibility for many complex websites while maintaining aesthetic quality. By allowing extensions like Dark Reader to take control of dark mode, Orion can avoid the pitfalls of maintaining its own complex rendering engine and instead focus on ensuring a smoother, bug-free experience when transitioning between pages.

      It looks that we can check what is the default background color in Orion when the system is in dark mode.

      6 months later

      @fish the problem as stated in the report is that it still flashes white, even if you use dark reader or dark mode for the website (it works fine in Safari). Here’s an example:

      No one is typing