JWB
JWB copied to clipboard
Edit progress is deleted after CSRF/Network errors
Just started using JWB, really enjoying it!
I noticed that if I leave my JWB browser tab open for a while and then come back to it, I'll sometimes hit CSRF errors (from here). That's expected, but hitting either "OK" or "Cancel" discards the current edit. Seems that the problem is caused by "OK" skipping to the next page, and "Cancel" triggering "Stop", both of which cause the current edit to be discarded.
Since the "confirm" modal takes focus, I'm also unable to save my edits by copying the contents into a separate document.
This can be reproduced by starting to edit a page, disabling internet access on your computer, then clicking "Save".
Unfortunately I don't have a clear fix in mind, since a page reload seems required to get a new CSRF token. Maybe some kind of error state where all buttons are disabled, but the text content can be freely copied out?