Skip to content

Firefox Issue with Darkmode, prevents page load #139

@kaiden11

Description

@kaiden11

Versions:

  • Firefox: 126.0
  • Chrome: 119.0

Description: Upon attempting to detect dark mode during page load, Firefox attempts to operate on the non-existent id=darkmode element in the <head>.

Steps to reproduce:

  1. Run docker run:

    docker run --name openspeedtest -p 3000:3000 -p 3001:3001 openspeedtest/latest
    
  2. Open http://localhost:3000/

  3. Observe a blank window (failed page load), with the following in the browser console:

OpenSpeedTest.com V2.5.4 Loaded! localhost:3000:131:15

Now Press the Start Button or HIT Enter. localhost:3000:132:15

The secret to living happy is giving happiness. Have a wonderful day. localhost:3000:133:15

Uncaught TypeError: c is null
    addEvt http://localhost:3000/assets/js/app-2.5.4.min.js line 8 > srcScript:30
    jb http://localhost:3000/assets/js/app-2.5.4.min.js line 8 > srcScript:44
    Start http://localhost:3000/assets/js/app-2.5.4.min.js line 8 > srcScript:51
    onload http://localhost:3000/assets/js/app-2.5.4.min.js line 8 > srcScript:9
    EventHandlerNonNull* http://localhost:3000/assets/js/app-2.5.4.min.js line 8 > srcScript:9

app-2.5.4.min.js line 8 > srcScript:30:282
Uncaught TypeError: nightMode is null
    changeSkin http://localhost:3000/assets/js/darkmode.js:2
    EventListener.handleEvent* http://localhost:3000/assets/js/darkmode.js:1
darkmode.js:2:247

Attempting the same page load with Chrome does not exhibit this issue.

There does not appear to be a 'mode' cookie that would indicate a previous detection of dark mode. The 'matchMedia' handling in the <head> script does not appear to fail, but later reference to the darkmode element prevents further page load (and results in no interface presented in Firefox).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions