From: timeless%mozdev.org <> Date: Fri, 24 Aug 2007 09:45:18 +0000 (+0000) Subject: Bug 387607 detect and accommodate restored "edit attachment as comment" mode X-Git-Tag: bugzilla-3.0.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0505bc8444cb49cb16ef128bd4fae40cf8a54b2a;p=thirdparty%2Fbugzilla.git Bug 387607 detect and accommodate restored "edit attachment as comment" mode r=myk a=mkanat --- 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; }