silverstripe/sapphire — pull request #847 by forsdahl (2012-10-05 07:29:12+00:00)
Title: BUG: HTMLEditorFields disappear when switching between pages

The HTMLEditorField for SiteTree Content disappears after switching pages in CMSPagesEditController.
This seems to be somehow caused by tinyMCE 3.5.7 not creating a new editor instance on entwine's onadd when
the old editor is removed on entwine's onremove (it happens too fast after onremove on the old form?).

Fixed by removing the editor instance when the beforestatechange event is fired, and by cheking if
the editor instance is already removed in onremove.