Skip to content

Uncaught TypeError: Cannot read properties of null (reading 'classList') #3539

@FlippingBinary

Description

@FlippingBinary

I'm getting an error in console when swiping slides while simulating Samsung Galaxy S8+ in Vivaldi (Chromium-based) on Windows 10 using Reveal.js 5.0.2. I haven't checked to see if it affects mobile interaction more broadly.

Uncaught TypeError: Cannot read properties of null (reading 'classList')
    at _t.deactivatePage (reveal.esm.cd96fbcf.js:13:28379)
    at Object.deactivate (reveal.esm.cd96fbcf.js:13:21463)
    at _t.deactivateTrigger (reveal.esm.cd96fbcf.js:13:28524)
    at reveal.esm.cd96fbcf.js:13:26152
    at Array.forEach (<anonymous>)
    at _t.syncScrollPosition (reveal.esm.cd96fbcf.js:13:25865)
    at _t.onScroll (reveal.esm.cd96fbcf.js:13:28829)

The problem appears to occur at this line:

page.backgroundElement.classList.remove( 'present' );

page.backgroundElement is assumed to be an object containing a classList property, but it is null instead. I tried adding a null-check, but I'm getting a RollupError and don't know anything about gulp so it's a rabbit-hole I'm not prepared to dive into right now.

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