Skip to content

useRant not being fired through Self when the document has existing element #131

@TristanCacqueray

Description

@TristanCacqueray

Hello,

I'm having a puzzling bug here:

https://github.com/TristanCacqueray/deku-element/blob/f1cd1fa2ee93ae292825a448898905b834bf073b/src/DekuGrid.purs#L131-L134

This used to work fine, e.g. info event is triggered and the drawGrid animation is performed. But after adding some elements to the index.html, it seems like the useRant is no longer working as expected, e.g. the info poll is no longer firing after the call to setCanvas... This happens like 90% of the time when loading the app through npx vite.

Removing <p>banner</p> from the index.html fixes the issue, e.g. the drawGrid is properly called.
Increasing the delay value or moving the updateGrid call after the delay helps, but the bug can still happens, like 10% of the time.

Any idea what can be the issue?
Thanks in advance!

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