summaryrefslogtreecommitdiffstats
path: root/extensions/Splinter/web
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-10-17 06:13:12 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-10-17 06:13:12 +0200
commit6d9f7e5de586a9e7a4a7c3ee7aea08e204b8d24e (patch)
treeae088e75d3ab96ff93b484dff2c34c51e3fe894f /extensions/Splinter/web
parent1603951776f59a25f51dc6bfe767ee2cb032ba19 (diff)
downloadbugzilla-6d9f7e5de586a9e7a4a7c3ee7aea08e204b8d24e.tar.gz
bugzilla-6d9f7e5de586a9e7a4a7c3ee7aea08e204b8d24e.tar.xz
merged with bmo/4.0
Diffstat (limited to 'extensions/Splinter/web')
-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();
}