From 4e12c8ce65dd4eebfee06091924baa9e04e46e7f Mon Sep 17 00:00:00 2001 From: Kohei Yoshino Date: Thu, 29 Nov 2018 09:08:44 -0500 Subject: [PATCH] Bug 1510832 - Adding a trailing space to a comment causes an error --- extensions/EditComments/web/js/inline-editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/EditComments/web/js/inline-editor.js b/extensions/EditComments/web/js/inline-editor.js index f99bc5dda..605ab8ff8 100644 --- a/extensions/EditComments/web/js/inline-editor.js +++ b/extensions/EditComments/web/js/inline-editor.js @@ -50,13 +50,14 @@ Bugzilla.InlineCommentEditor = class InlineCommentEditor { } /** - * Check if the comment is edited. + * Check if the comment is edited. Ignore leading/trailing white space(s) and/or additional empty line(s) when + * comparing the changes. * @private * @readonly * @type {Boolean} */ get edited() { - return this.$textarea.value !== this.raw_comment; + return this.$textarea.value.trim() !== this.raw_comment.trim(); } /** -- 2.47.3