8fe80e743c
This is a workaround for an upstream bug which I have not been able to reproduce outside of Moodle whereby the editor.contentWindow does not match the editor.iframeElement.contentWindow when it should. This issue only seems to affect Firefox, and it may even be a bug in Firefox. It can only be reproduced when using a fresh browser which has never had a TinyMCE window open.