]> 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:18 +0000 (09:45 +0000)
committertimeless%mozdev.org <>
Fri, 24 Aug 2007 09:45:18 +0000 (09:45 +0000)
r=myk a=mkanat

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

index 94581ab564b40c72f3d15bd9beeab0ec4f519d10..6ac7e44aa931086c324dc311d29118626c47884a 100644 (file)
@@ -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;
     }