Agility - cancel editing on escape keypress

Solves #789 for Agility.js.