]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 387607 detect and accommodate restored "edit attachment as comment" mode
authortimeless%mozdev.org <>
Fri, 24 Aug 2007 09:45:17 +0000 (09:45 +0000)
committertimeless%mozdev.org <>
Fri, 24 Aug 2007 09:45:17 +0000 (09:45 +0000)
r=myk a=mkanat

template/en/default/attachment/edit.html.tmpl

index ffa53493d4485893c9f08caa097bb8bd6c44ed73..90ce7ce843f5771c911be9049374e6760ed91492 100644 (file)
@@ -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;
     }