Editor throws an exception when destroyed shortly after it was created
Type of report
Bug
Provide detailed reproduction steps (if any)
There's a possible race condition if you delete the editor right after it was instantiated.
- Open codepen demo.
- Open JavaScript console.
- Click the "Load/Destory" button.
Expected
Nothing happens.
Actual
Uncaught TypeError: Cannot read property 'allow' of undefined exception is being thrown.
Note that it could sometimes require like 3 or 5 attempts to repro.
Other details
Originaly reported in old tracker as #14613.
- Browser: Any
- OS: Any
First solution was introduced in #273 I'll take over it, as it requires tests.
Not sure if I should create a separate issue for this, but it is related to editor and DOM elements being destroyed before editor instance is ready.
On Edge, permission denied exceptions are thrown by the wysiwygarea plugin if iframe elements are removed before it fully initializes. Repro https://codepen.io/anon/pen/MZEEJg, but you may have to fix the error above ("Cannot read property 'allow' of undefined") before encountering the iframe-related exceptions.