rem: if (!editorShell.documentModified) 
add: if (!editorShell.documentModified && !gHTMLSourceChanged) 
context: function CheckAndSaveDocument(reasonToSave, allowDontSave){  var document = editorShell.editorDocument;  if (!editorShell.documentModified)    return true;  // call window.focus, since we need to pop up a dialog  // and therefore need to be visible (to prevent user confusion)  window.focus();    var title = window.editorShell.editorDocument.title;  if (!title)    title = GetString("untitled");  var dialogTitle = window.editorShell.GetString("SaveDocument");  var dialogMsg = window.editorShell.GetString("SaveFilePrompt");  dialogMsg = (dialogMsg.replace(/%title%/,title)).replace(/%reason%/,reasonToSave);  var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService();  promptService = promptService.QueryInterface(Components.interfaces.nsIPromptService);  var result = {value:0};  promptService.confirmEx(window, dialogTitle, dialogMsg,  						  (promptService.BUTTON_TITLE_SAVE * promptService.BUTTON_POS_0) +  						  (promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1) +  						  (allowDontSave ? (promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_2) : 0),  						  null, null,  						  (allowDontSave ? window.editorShell.GetString("DontSave") : null),  						  null, {value:0}, result);   if (result.value == 0)   {     // Save     var success = window.editorShell.saveDocument(false, false, editorShell.contentsMIMEType);     return success;   }   if (result.value == 2) // "Don't Save"     return true;  // Default or result.value == 1 (Cancel)  return false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2137b17254e489b0cf998c4227e1abd9516d0545/editor.js/clean/editor/ui/composer/content/editor.js