From 0505bc8444cb49cb16ef128bd4fae40cf8a54b2a Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" <> Date: Fri, 24 Aug 2007 09:45:18 +0000 Subject: [PATCH] Bug 387607 detect and accommodate restored "edit attachment as comment" mode r=myk a=mkanat --- template/en/default/attachment/edit.html.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index 94581ab564..6ac7e44aa9 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -82,7 +82,8 @@ // Copy the contents of the diff into the textarea var editFrame = document.getElementById('editFrame'); - editFrame.value = theContent + "\n\n"; + if (editFrame.value.test(/^\s*$/m)) + editFrame.value = theContent + "\n\n"; has_edited = 1; } -- 2.47.3