Skip to content

Page modules leak delegated handlers on #app/document (compare, channels, live) — remainder of #405 #428

Closed

Description

@dborup

Remaining part of #405 (the observers.js part was fixed in #419, merged as 20513d48). The sweep in #419 found 15 more page-module handlers that are bound to the shared #app/document container and never removed in the page's destroy():

  • public/compare.js: 1
  • public/channels.js: 6
  • public/live.js: 8

The full list with line numbers is in the #419 PR description, under "Same-class leaks found but NOT fixed".

The review of #419 confirmed that two of them are live on master [T]. After 3 visits followed by Nodes, #app carries keydown ×3 from Compare and click ×3 from Channels.

Required work

  • Fix each site the same way as fix(ui): stop observers.js leaking delegated handlers on #app (#405) #419: bind to the page's own container, or remove the handler in destroy().
  • Each page gets a red/green regression test: N visits, then another page, then assert that no handlers are stacked or still firing.
  • Keep page behaviour unchanged. That includes Live's map/WebSocket handling: note the known Live init/teardown races and do not regress them.

Activity

  1. added a commit that references this issue on Oct 13, 2026
  2. dborup commented on Oct 13, 2026

    @dborup
    OwnerAuthor

    Fixed by #437 (merged as bcf263e13ff04352d27bff61757e03ec4ad0ac33).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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