From 1666d8d99f9cb636419639afe561afc983eb6d81 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Wed, 27 Jul 2011 02:38:08 +0100 Subject: [PATCH] Escape --- js/front.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/front.js b/js/front.js index 4880cef..3cec347 100644 --- a/js/front.js +++ b/js/front.js @@ -107,9 +107,14 @@ var front = { $('.cur_topic').live('keypress', function(e) { if (e.keyCode === 13) { + // enter e.preventDefault(); $(this).change(); $('#kiwi_msginput').focus(); + } else if (e.keyCode === 27) { + // escape + e.preventDefault(); + $(this).text(front.original_topic); } }); $('.cur_topic').live('change', function (e) { -- 2.25.1