What is the problem?
In some circumstances, if the reload request times out the realtime preview pane is blank (showing only the manual reload bar, see screenshot).
This appears to happen only if the timeout occurs after I have already successfully reloaded the preview 3 times. (I believe the code has some logic which means it behaves differently after the first 3 reloads, see T304568.) It doesn't happen if your first reload times out.
So, for example, if I have a generally good connection but it drops out for a short period I might experience this bug.
It is recoverable though. If you reload the page again you will see either the normal error message ("Preview not loading") or the preview will display successfully with the manual reload bar appearing (if your connection has returned).
Steps to reproduce problem
- Login to beta as a user with RTP enabled
- https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Cat&action=edit
- Reload the realtime preview 3 or more times
- Open the devtools and throttle the connection as much as you can (disconnecting from the internet might work)
- This is easier with Firefox as you can set your connection to "GPRS" which I find does the trick. With Chrome, you have to create a custom profile.
- Reload the realtime preview again
Expected behavior: The request times out and you see a nice error message such as in T303383.
Observed behavior: The realtime preview pane is blank.
Environment
Browser: Firefox 91, Chromium 87
Wiki(s): https://en.wikipedia.beta.wmflabs.org and local docker MediaWiki 1.39.0-alpha (1eb3596) 05:55, 27 April 2022.
Editor: WikiEditor 0.5.3 (0e1ca81) 06:08, 27 April 2022.
