ckeditor4 icon indicating copy to clipboard operation
ckeditor4 copied to clipboard

Editor throws an exception when destroyed shortly after it was created

Open mlewand opened this issue 8 years ago • 2 comments

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.

  1. Open codepen demo.
  2. Open JavaScript console.
  3. 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

mlewand avatar Jul 25 '18 10:07 mlewand

First solution was introduced in #273 I'll take over it, as it requires tests.

mlewand avatar Jul 25 '18 10:07 mlewand

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.

tahoon-ms avatar Dec 28 '18 22:12 tahoon-ms