I noticed an error in my JS console when visiting closed questions on SO:
Uncaught (in promise) TypeError: n is null
<anonymous> https://cdn.sstatic.net/Js/questions/show.en.js?v=f6ce488fd0ca:1
<anonymous> https://cdn.sstatic.net/Js/questions/show.en.js?v=f6ce488fd0ca:1
promise callback* https://cdn.sstatic.net/Js/questions/show.en.js?v=f6ce488fd0ca:1
<anonymous> https://cdn.sstatic.net/Js/questions/show.en.js?v=f6ce488fd0ca:1
<anonymous> https://cdn.sstatic.net/Js/questions/show.en.js?v=f6ce488fd0ca:1
show.en.js:1:21974
Seems to be because of this JS:
const n=document.querySelector("#post-form .js-post-body-field[data-post-type-id='2']"),
s=n.parentElement.querySelector("#js-stacks-editor-container");
Where #post-form
does not exist in closed questions. Noticed it because it was preventing some userscript from running.
I checked on another network site and didn't notice the same thing, which is why it's posted here and not MSE.
post-form
in your HTML? For me, on open questions it's right after the answer elements, but is not there on closed questions. I have both the disable new editor and experiment opt-out toggles off. No ad blockers here either, and of course I disabled my userscript extension.#post-form
is the whole "Your answer" form, so it makes sense why it wouldn't be on closed posts.