summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/Splinter')
-rw-r--r--extensions/Splinter/web/splinter.js5
1 files changed, 5 insertions, 0 deletions
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();
}