-
Bug
-
Resolution: Fixed
-
Blocker
-
4.1.2
So I have just spent a significant amount of time debugging this issue.
Given I am using Firefox
And I have just opened my browser (or am using a Private browsing tab)
And I am using the TinyMCE editor
And I open a modal form (I used the Dashboard calendar's "New event" button
And I have that form generate a server-side error which causes the form to be reloaded - I set a value for the Name, and set the Event type to "Course" without selecting a course
When I submit the form
Then I should not see any NS_ERROR_UNEXPECTED errors in the JavaScript Console
Unfortunately I haven't been able to replicate it outside of Moodle to be able to report this upstream, but I can reliably reproduce it in Moodle.
Essentially what happens is that when we're creating an editor after having removed an editor with the same id from the DOM, and then removing it from the TinyMCE editor API, when using Firefox, the reference in the Editor API to the contentWindow does not match the iFrame contentWindow that it's meant to return.
I have yet to find out why this happens, but I do have a patch which addresses it.
I'm going to continue to try and replicate this upstream, though we will hopefully have some support from TinyMCE themselves in the future which will make this easier.