From: timeless%mozdev.org <> Date: Fri, 24 Aug 2007 09:45:17 +0000 (+0000) Subject: Bug 387607 detect and accommodate restored "edit attachment as comment" mode X-Git-Tag: bugzilla-3.1.2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47d029440441509d18026a9bc38b3e6da89d0bbf;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 ffa53493d4..90ce7ce843 100644 --- a/template/en/default/attachment/edit.html.tmpl +++ b/template/en/default/attachment/edit.html.tmpl @@ -79,7 +79,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; }