The fallback text, "JavaScript is not enabled..." is loaded by default and then later modified by the JavaScript module. If the javascript is slow to load, the fallback text will be wrongly displayed to the reader until the module loads. See file for example
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Improve CSS and JS loading of ChessBrowser | mediawiki/extensions/ChessBrowser | master | +403 -438 |
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T239440 Improve ChessBrowser interface | |||
| Open | None | T287990 Make ChessBrowser's user-facing error reporting more specific | |||
| Resolved | TheDJ | T282503 Fallback text displays even when javascript is enabled |
Event Timeline
This seems to be a result of slow javascript loading. The HTML loads before the JS module giving a flash of unstyled content to the user. Any solution will need to keep in mind T239446. As for how to fix this, I think redesigning the plaintext fallback would be best. Currently the underlying HTML is the fallback text seen, and the JS modifies it. A better method might be to have a failed JS load throw an error that we catch at the end and then add the fallback text so that it doesn't get displayed if the JS is loading slowly.
this can be easily fixed by using the .client-js class to hide the element, instead of JS. I'll do that tonight.
Change 715603 had a related patch set uploaded (by TheDJ; author: TheDJ):
[mediawiki/extensions/ChessBrowser@master] Improve CSS and JS loading of ChessBrowser
Change 715603 merged by jenkins-bot:
[mediawiki/extensions/ChessBrowser@master] Improve CSS and JS loading of ChessBrowser