Chat draft saving

When composing a chat message (either on an activity or Chats), I often end up navigating away from the chat box mid-message to check something (e.g., power distribution on the Power tab). Unfortunately, this silently loses the composed-but-not-yet-sent text.

It is easy to work around out - just use two different browser windows/tabs - but it is way too easy to click on something without thinking and lose the text.

Two options I can think of:

  1. save any unsent chat text as a “draft” when navigating away (or save it periodically in the background so navigating away doesn’t have to change)
  2. if there is unsent chat text, use a “are you sure you want to leave & lose chat text?” modal dialog

I have a mild preference for option 1, but option 2 would be good enough to avoid the chat text loss.