When you use a collapsible region that contains Codemirror html, this may not work well.
If the default status of the region is Collapsed, the Codemirror javascript will not update the region once it is expanded, leaving parts of it blank.
Maybe a forced refresh of the region after expansion would fix this, but that is not a very elegant solution of course.
This is probably an issue with similar javascript/html combinations as well.