Warn before allowing navigation away from a page with text in forms (BB-9183)
Try typing in some text into a textarea on bitbucket. Say this 'create issue' form (https://bitbucket.org/site/master/issues/new) or a comment form on a commit. Type in a few lines.
a) Navigate away by clicking on a link or hitting the 'back' button. The user should be warned that they have unsaved changes.
b) Return to the page with the form. The contents typed in are missing.
Both these behaviors would work for free on any modern browser if you just used a simple textarea.
Data loss is a huge problem when it happens. It stifles long-form conversation. It's worth being conservative to avoid.
I remember when browser textareas used to eat my comments all the time. It took 10 years, but they're rock solid now. I've literally had my laptop battery die on me mid-sentence, booted up, restarted my browser, and there's my half-written comment right there.
At the very least, provide a mode that's a simple textarea that doesn't prevent the browser from saving its contents.