Skip to content

Arriving on certain pages sometimes triggers the light theme #1635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbitouze opened this issue Jan 7, 2024 · 3 comments
Closed

Arriving on certain pages sometimes triggers the light theme #1635

dbitouze opened this issue Jan 7, 2024 · 3 comments

Comments

@dbitouze
Copy link
Contributor

dbitouze commented Jan 7, 2024

With version 0.15.1, I noticed a (sorry: random) behavior: with auto mode (using the dark theme) previously selected, arriving on certain pages sometimes (not always) triggers the light theme. The console (sometimes: not each time the bug happens) reads:

Got invalid theme mode: . Resetting to auto. [pydata-sphinx-theme.js:32:12](webpack://pydata_sphinx_theme/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js)
    u pydata-sphinx-theme.js:32
    h pydata-sphinx-theme.js:90
    (Asynchrone : EventListener.handleEvent)
    r mixin.js:12
    937 pydata-sphinx-theme.js:579
    a async module:49
    937 pydata-sphinx-theme.js:1
    Webpack 3
        c
        <anonyme>
        <anonyme>
[PST]: Changed to auto mode using the light theme.
@dbitouze
Copy link
Contributor Author

Still happens with PST 0.15.2.

@dbitouze
Copy link
Contributor Author

Maybe it is worth mentioning that:

  • this bug happens with Firefox 122.0 but not with Chromium 120.0.6099.216
  • when arriving on the culprit pages, the following message appears sometimes in the console:
Got invalid theme mode: . Resetting to auto.                     pydata-sphinx-theme.js:32:12
    u pydata-sphinx-theme.js:32
    h pydata-sphinx-theme.js:90
    (Asynchrone : EventListener.handleEvent)
    r mixin.js:12
    937 pydata-sphinx-theme.js:579
    a async module:49
    937 pydata-sphinx-theme.js:1
    Webpack 3
        c
        <anonyme>
        <anonyme>

@trallard
Copy link
Collaborator

trallard commented Feb 5, 2024

This seems to be fixed by #1683 so will close this issue for now

@trallard trallard closed this as completed Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants