Skip to content

In Firefox target not defined in render.js#L196 (_mount/handle_event) #16588

@laszlokorte

Description

@laszlokorte

Describe the bug

Sometimes target in https://github.com/sveltejs/svelte/blob/main/packages/svelte/src/internal/client/render.js#L196 is not defined in Firefox.

The exception occurs especially if the page is loaded in a background tab.
Could be a scheduling/GC bug in firefox again.

Reproduction

I am not able to reproduce the bug in a minimal example and not in dev mode.
But I noticed for multiple of my svelte pages running in production that the page sometimes does not load if it is opened in a new tab in Firefox loading in the background.

For example open this link in new tab multiple times (20 times) so that the tab loads in the background. Then switch to the newly opened tabs one after another and notice that for some of them the page did not load but threw an exception.

Image Image

Logs

System Info

svelte@5.38.0
Firefox 141.0.3 (aarch64)

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions