1j01 / jspaint

🎨 Classic MS Paint, REVIVED + ✨Extras
https://jspaint.app/about
MIT License
7.23k stars 563 forks source link

What does "Save changes to untitled" do? #126

Closed rraallvv closed 6 years ago

rraallvv commented 6 years ago

Sorry if this seems like a dumb question or if it might already been answered before. But I'm trying to figure out what the dialog asking whether to "Save changes to untitled?" does. The reason is that it seems to pop up sometimes when a the webpage refreshes, but it's not immediately obvious what it does, I'm not sure if it clears or saves the current canvas, so I always click the option "Cancel", thus it wouldn't hurt if I completely remove it from my fork, or at least disable it showing up on page refreshes.

screen shot 2018-08-30 at 9 51 21 am

1j01 commented 6 years ago

I don't think this is ever supposed to pop up when the page loads / refreshes. That dialog is meant for when opening a new document (with drag and drop or File > Open) or starting a new document (with File > New).

...Well, okay, so JS Paint has a recovery/auto-save feature, and currently it'll show this dialog if you click/interact with the document before the page finishes loading. Does it happen if you just refresh and don't do anything until it's fully loaded, or only if you click/interact?


If you click Discard it'll discard what's currently on the canvas and show what it's trying to load. (You could also go to File > Manage Storage to see what it's probably trying to load, by hovering over the Open links and seeing which one matches up with the URL in the address bar.)

rraallvv commented 6 years ago

@1j01 I see... now that you mentioned it seems to appear only when the page refreshes itself, Safari on macOS sometimes do that, it shows a message at the top of the webpage saying that the page failed to load. I guess I can try to disable the dialog just for that particular case I described. Thanks for looking into this, it's very much appreciated.