dark theme preference on main website doesn't work as expected.
-
@shocked-gamer
I have the same issue on my side. Normally I have Dark Theme switched to ON when I am on Notepad++ website. But every time, when I reload the Website (preferred by just pressing F5), the Theme reverts back to Light Theme. So unfortunately it seems this setting is not remembered somewhere in the cookies.I have learned in the meanwhile to live with it. Since I normally restore my old session in Firefox, I am used to do a Ctrl+Tab and F5 very fast for all Tabs. So switching this Dark Theme button is my every-two-days routine when Notepad++ website was open.
I am not logged in with some Firefox account, so could be possible, that with an account, this setting is remembered like @lycan-thrope stated.
-
@MarkusBodensee , @lycan-thrope , @shocked-gamer ,
I cannot replicate.
I downloaded Firefox onto a Win10 VM I have, and I ran a blank, out-of-the box copy, no configurations yet, not signed into Firefox at all. I went to https://notepad-plus-plus.org/ , opened F12 to show the Web Developer Tools, went to Storage > Local Storage, and saw https://notepad-plus-plus.org/ had KEY=
darkThemewithnonewhen I am in the site’s light mode orscreenwhen I am in the site’s dark mode. (Please note: my experiments are all with the OS and browser in light mode; it is just the website’s light-vs-dark that I’m experimenting with.)I set the site’s dark mode. Refresh the page, still in dark mode, still shows
darkTheme=screen. Close Firefox. Run Firefox. Go to https://notepad-plus-plus.org/. Still in Dark Mode, F12 still showsdarkTheme=screenMaybe when you’re signed out, it uses one set of LocalStorage, and when you’re signed in, it uses another LocalStorage? That’s just a guess, and I don’t have a firefox account, and am not going to bother creating one for this. So, for someone who has the problem: when you’re signed out, if you set it to dark mode, does it stick when you exit Firefox and come back in still signed out? Hmm, re-reading @markusbodensee’s post, this disagrees with what he said. I haven’t regularly used Firefox for the better part of a decade, so I’m out of my depth here… I am just trying to add some data – specifically, that for me, with default Firefox, not logged in, it does remember. So that’s highly pointing to specifics of Firefox installation/settings/plugins/etc.
I double-checked, and my Settings > Privacy & Security had a section called “browsing data” (not “Cookies and Site Data” as @myfancytextgenerator reported). But that section had a setting called “Clear cookies and site data every time you close Firefox”, and that defaulted to not checkmarked.
-
@PeterJones ,
Two things I think is going on here. I thought he was talking about Notepad++ forums. There is no need, in the forums, to have a Firefox account or be signed in. That is what I’m talking about, when I say Firefox must be signed into the forums, for the dark mode of the forums to switch for me, upon signing in.The website for NP++, I just need to click the setting at the bottom of the https://notepad-plus-plus.org/ and it goes dark. When I closed the page and opened in a new tab, it was already in dark mode, so that works as well, and yes, unless he’s referring to the forums, which I’ve described, his condition I can’t duplicate, either.
-
Hmm, re-reading @markusbodensee’s post, this disagrees with what he said.
It happens to me only when I do a refresh/reload of the website. So explicitly when I do a reload via the circled arrow or via F5 key, both do the same thing. Otherwise the dark mode setting is kept.
So visit website https://notepad-plus-plus.org/ and switch dark mode to on:
- click on top left banner of website to reload page --> stays in dark mode
- further navigation on the website --> stays in dark mode
- close firefox and reopen it again:
-
- visit website again --> stays in dark mode
-
- restore last session --> stays in dark mode
Switch:
- press circled arrow or via F5 key --> website switch to light mode
-
press circled arrow or via F5 key --> website switch to light mode
Okay, when I try that in the VM firefox, then it does switch to light mode, and the value in Local Storage changes from
darkTheme=screentodarkTheme=none.At first blush, since Firefox is behaving weirdly (remembering it when you exit FF and reload the page, but forgetting it on F5/refresh-button), I would call that a bug in Firefox. But it might be that whatever javascript library the main Notepad++ website is using to set the Local Storage value has been optimized for Chrome syntax, and is doing something to confuse FF on F5/refresh. I don’t know enough about Local Storage, or the library that is used on the main website, to say more.
I thought he was talking about Notepad++ forums.
He did say “on the main website”, which I took to mean the main product website, not this forum; but honestly, like you, on first blush, I thought he might be asking about the forum, which is why I explicitly referenced the main site’s URL in my reply, so there was no ambiguity which site I was talking about, and if I wasn’t talking about the right one, I was hoping @shocked-gamer would reply with clarification.
But, despite logging in a day after our initial pair of replies, @shocked-gamer has never replied, nor logged into the forum again after, so we might never know, or be able to help them.
There is no need, in the forums, to have a Firefox account or be signed in. That is what I’m talking about, when I say Firefox must be signed into the forums, for the dark mode of the forums to switch for me, upon signing in.
Regarding the forum: the forum colors are based on per-user preferences, so of course if you aren’t signed into the forum, it won’t use your forum-user’s settings. (anonymous users cannot change forum display settings.)
-
Okay, when I try that in the VM firefox, then it does switch to light mode, and the value in Local Storage changes from
darkTheme=screentodarkTheme=none.Thank you for testing and confirmation. It’s good to hear, that it is not a specific misbehaviour on my side which I am unable to solve, but more a general issue.
Nevertheless, since I learned to live with it, it doesn’t bother me too much. If it ever gets fixed some day, I’ll get used to it too. ;-)
-
@MarkusBodensee ,
Okay, I followed your instructions to reproduce and I did, in fact reproduce it upon starting Firefox a new, but like @peterjones has mentioned, that’s a Firefox issue. A clue might be that I have everything reset between browser uses, so everything gets reset upon shutting down. I have high security setting.I have somewhat of an explanation, however. Many times when I’ve signed out of sites, I can go to resign back in, and the ‘username’ is still valid, and all I have to enter is my password. via Firefox password feature. Sometimes things mess up and won’t function, and I have to close the browser to reset everything, and apparently, that is what’s happening with the Notepad++ main page. When you refresh the page, it’s doing a kind of soft reset (Ctrl/Alt/Del), versus a hard reset(power button), when you do a reload and resets parameters.
-
sorry for not following the post sooner (work life was keeping me quite busy)
as for the original post, i wrote it without providing steps or more info, sorry about that. i was talking about https://notepad-plus-plus.org/ , the dark theme doesn’t stay dark upon refreshing the page, navigating the site after it’s been enabled will work OK, up until pressing F5.
when i used a clean profile, by renaming the current profile in appdata/roaming/mozilla folder, i opened FF and navigated directly to https://notepad-plus-plus.org/.
i just did another test, i installed FF 140 that was released on June 24, 2025 with a clean profile, the issue is still reproducable. i guess something is broken in the website about how it stores cookies/data. the 140 version is from last year, i didn’t keep the browsing history for that long, i delete it every few months or when i feel that it “slows down” the browser.
how can i bring this issue to the attention of the np++ developer?
-
i guess something is broken in the website about how it stores cookies/data
The problem is, Chrome has no such issue – exiting, refreshing, it all keeps the LocalData. It’s Firefox that’s forgetting the LocalData on refresh. That strongly points to a bug in FF’s handling of LocalData, not in the website code.
how can i bring this issue to the attention of the np++ developer?
he uses the GitHub issues tracker for the main app to track problems with the main website as well. You can find the link to the tracker in the Feature/Bug FAQ. But since it appears to be only Firefox that has the problem, there might not be anything he can do about it. (Also, I’m not sure he knows anything about the javascript on that page; I think he’s using a prebuilt solution for it, so he might not be able to fix it.)
-
@shocked-gamer , I created Issue #18534.
I did some more digging into the javascript, and played with a replica of the relevant HTML and JS.
I found that when the page is reloaded via a REFRESH / F5, browsers Chrome and Edge will always treat the
checkbox.click()in theDOMContentLoadedevent as an instruction to checkmark the checkbox. However, Firefox seems to remember that the checkbox was already checkmarked, so when it sends that method, Firefox clears the checkmark, putting it back into light mode.In the Issue, I supplied a slight tweak in the code that will make it correctly set that checkbox to true by not using the
.click()method, but insteadcheckbox.checked = true;. With that, my experiments showed that Chrome, Edge, and Firefox would all remember the Dark Mode state on REFRESH or exit and relaunch. So I think that’s enough.Please note: this is because Firefox interprets the initial state of the checkbox differently after REFRESH than Chrome/Edge do. So it’s modifying the javascript to overcome a difference in interpretation of the specs between the different browsers.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login