Opened 8 years ago

Last modified 8 years ago

#14809 closed Bug

Divarea: Calling insertElement() in Edge before clicking into editor gives error — at Version 1

Reported by: Mark Wade Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.2
Keywords: Edge Cc:

Description (last modified by Jakub Ś)

Steps to reproduce

  1. Download the attached file, and edit line 6 to point to correct CKEditor path which has the "Div Editing Area" plugin enabled
  2. Load it in the latest version of Edge
  3. Click the "Click Me" button.

Expected result

"Hello, World!" appears inside the editor

Actual result

The contents of the editor do not change, and the following error is logged to the console:

SCRIPT5007: Unable to get property 'checkReadOnly' of undefined or null reference

Other details (browser, OS, CKEditor version, installed plugins)

Seems to happen when calling insertElement() before the user has clicked into the editor (this is common in our usage, as we have a "Quote" button next to all posts, which initiates an editor and then inserts the quoted post into it).

Happens in the latest version of Edge (38) but doesn't happen in older versions (14 is the latest available on Browser Stack and it doesn't happen there - but it seems to be the most recent update as this issue has only recently been reported to us) or in any other browser.

Does not happen unless the Div Editing Area plugin is present.

Bug report in our system: https://invisionpower.com/4bugtrack/active-reports/41132-edge-wont-quote-a-post-r12195/

Change History (2)

comment:1 Changed 8 years ago by Jakub Ś

Description: modified (diff)
Keywords: Edge added
Status: newconfirmed
Summary: Calling insertElement() in Edge before clicking into editor gives errorDivarea: Calling insertElement() in Edge before clicking into editor gives error
Version: 4.5.10 (GitHub - master)4.5.2

Does not happen unless the Div Editing Area plugin is present.

Your sample doesn't include divarea plugin. I needed to update it.

Support for Edge was first introduced in CKEditor 4.5.2 so this is the version I'm setting as a starting point although problem occurs before that version as well.

Since this issue doesn't happen once you click into editor, I thought that below 'if' could solve the problem but error is thrown despite putting focus into editor.

e.preventDefault();
if( !editor.focusManager.hasFocus )
	editor.focus();
editor.insertHtml('<p>Hello, World!</p>');

Changed 8 years ago by Jakub Ś

Attachment: ckeditor-test.html added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy