From 47d029440441509d18026a9bc38b3e6da89d0bbf Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" <> Date: Fri, 24 Aug 2007 09:45:17 +0000 Subject: 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(-) (limited to 'template') diff --git a/template/en/default/attachment/edit.html.tmpl b/template/en/default/attachment/edit.html.tmpl index ffa53493d..90ce7ce84 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; } -- cgit v1.2.3-24-g4f1b