Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

bug: themechange event does not fire after system setting change #224

@mdbenito

Description

@mdbenito

Steps To Reproduce

  1. Install any plugin that handles theme changes, e.g. this one
  2. Change the penpot theme from within penpot: the plugin changes from light to dark theme correctly
  3. Leave penpot in "system theme"
  4. Change the system theme via the OS.
  5. The plugin's iframe is not updated.

I have tested and

penpot.on("themechange", (theme) => {
  console.log(`Theme changed to: ${theme}`)
});

fails to log anything when the theme change originates in the OS.

Expected behavior

The aforementioned message themechange is actually sent to the plugin so that it can inform its UI that it needs to update itself.

Actual behavior

On the LHS: the UI when I select dark mode within penpot. On the RHS: the UI when penpot is in system theme and I switch the OS' from light to dark mode:

Image Image

Screenshots or video

No response

Desktop (please complete the following information)

Ubuntu 24.04, Chrome Version 142.0.7444.59 (Official Build) (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions