Yes this is a bug. Every edited xhtml file is saved saved by focus moving or even pausing long enough.
The problem is that the nav must remain machine readable at all time as it provides the navigation toc. If you look at NavProcessor.cpp, it tries to parse the current nav and if for any reason it can not find a nav tag with epub:type equal to toc, it assumes the nav is "garbage" and tries to rebuild or replace it.
The problem is something is making focus move out of the nav's tab during intermediate typing and anything that is incomplete is making the Nav fail parsing and causing it to reject the nav and replace it.
This is obviously a bug. I either have to find out what is causing focus to move which in turn makes the incomplete file be saved and then the NavProcessor fail in its parse attempt.
I will look into either more robust parsing methods, or using gumbo to fix things first on the fly before parsing by NavProcessor to try to prevent this from happening.
Thanks for the bug report.
KevinH
|