Preventing making the document 'dirty' during initialization. This fixes #65

This commit is contained in:
Igal Tabachnik 2015-12-23 14:49:32 +02:00
parent 895d750928
commit 9c36a30d40
1 changed files with 8 additions and 2 deletions

View File

@ -190,8 +190,14 @@ namespace OpenLiveWriter.Mshtml
// register for dirty range
mshtmlControl.MarkupContainer.RegisterForDirtyRange(this, out _changeSinkCookie);
// perform document complete actions
OnDocumentComplete();
// During performing the document complete action, *something* is causing a document change log, which causes
// IHtmlChangeSink.Notify to fire, making the document 'dirty' even when nothing was changed.
// Suppressing handling of the 'dirty' notification until after document completion actions.
using (SuspendNotification())
{
// perform document complete actions
OnDocumentComplete();
}
}
}
catch (Exception e)