escape key ends editing

I was having trouble in Safari unfocusing `textarea`s. Sometimes clicking on other parts of the page wouldn't work. This patch keeps the current behavior but also ends editing when you press the escape key.

It seems weird to edit a file called "legacy" but that seems to be where all the code for the page is?