penrose / penrose

Create beautiful diagrams just by typing notation in plain text.

Home Page:https://penrose.cs.cmu.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feat: Warn user if they're about to close a browser tab with unsaved Penrose code

keenancrane opened this issue · comments

Would we want some kind of warning if a user is about to close a Penrose tab they've typed a bunch of code into?

E.g., https://stackoverflow.com/questions/2858057/ask-for-confirm-when-closing-a-tab

Mega-issue on this: #1683

there's no confirmation that you're abandoning work if you navigate to someone else's gist while in draft mode
there's no confirmation that you're abandoning work if you navigate to new webpage while in draft mode

The PR #1696 attempted this issue, but beforeunload seemed to be a blocker. Need to investigate again.