From 6d9f7e5de586a9e7a4a7c3ee7aea08e204b8d24e Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Mon, 17 Oct 2011 00:13:12 -0400 Subject: merged with bmo/4.0 --- extensions/Splinter/web/splinter.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'extensions/Splinter') diff --git a/extensions/Splinter/web/splinter.js b/extensions/Splinter/web/splinter.js index 842bebdb7..df3e74eac 100644 --- a/extensions/Splinter/web/splinter.js +++ b/extensions/Splinter/web/splinter.js @@ -1661,6 +1661,11 @@ Splinter.insertCommentEditor = function (commentArea, file, location, type) { Event.addListener('commentTextArea', 'keydown', function (e) { if (e.which == 13 && e.ctrlKey) { Splinter.saveComment(); + } else if (e.which == 27) { + var comment = Dom.get('commentTextArea').value; + if (previousText == comment || comment == '') { + Splinter.cancelComment(previousText); + } } else { Splinter.queueSaveDraft(); } -- cgit v1.2.3-24-g4f1b