Reproduce:
- Draft a post in wikitext mode (either new topic, or reply to existing)
- Click the mode-switch button. [Don't make any changes.]
- Press [Esc] key.
Expected:
- The "confirm discard" window should open ("Are you sure? Are you sure you want to cancel without saving first?")
Current:
- The draft vanishes from view, making me think I've lost everything.
- (If I click the text-field ("Start new topic" or "Reply to foo"), the draft reappears. But a frustrated user might not realize this.)
Confirmed in Firefox 47. Bug pointed out in https://www.mediawiki.org/w/index.php?title=Topic:T8r9s0quuoh5px0h&topic_showPostId=t8xyarrh02p072cg#flow-post-t8xyarrh02p072cg