Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#9443 closed Bug (fixed)

Firefox error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.execCommand]

Reported by: raz_atoth Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Firefox VendorFix Cc:

Description

Ways to replicate the bug: 1) Have a button,which once clicked inserts html text in the ck editor by calling: var ck=CKEDITOR.instances[editor_id]; if(ck)

ck.insertHtml(text);

2) Set CKEDITOR.config.enterMode = CKEDITOR.ENTER_BR; 3) Press the Enter key in the editor to create a new line,then press the button to insert the text.

At this point Firefox throws this error: Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.execCommand] Source File: ckeditor.js Line: 100

After some digging it seems this code is the culprit: N.document.$.execCommand('inserthtml',false,E);

From my testing it seems the error message doesn't pop up if CKEDITOR.ENTER_P is used or if (CKEDITOR.ENTER_BR)-after pressing Enter key-some additional text is inputed in the editor.

This bug seems to affect only Firefox,apparently,it works just fine with Chrome. I haven't tested it with IE/Opera/Safari.

Change History (6)

comment:1 Changed 6 years ago by Zlip792

I filed this bug on Firefox bugzilla and it was there side bug. Affected versions are Firefox 15 and 16. It is fixed in Firefox 17. I suggest you to try FF17 Beta to reproduce it. https://bugzilla.mozilla.org/show_bug.cgi?id=796839 See this bug for further detail.

comment:2 Changed 6 years ago by Jakub Ś

Keywords: Firefox VendorFix added

I can confirm that this is happening in Firefox 16 but before confirmimg or closing this ticket I will wait for official FF17 (Should be on 20.11.2012)

comment:3 Changed 6 years ago by Jakub Ś

#9537 was marked as duplicate.

comment:4 Changed 6 years ago by Jakub Ś

Resolution: fixed
Status: newclosed

I can confirm that this issue no longer exists on FF17.

comment:5 Changed 6 years ago by Muhammad Seude

Last edited 6 years ago by Muhammad Seude (previous) (diff)

comment:6 in reply to:  4 Changed 6 years ago by Muhammad Seude

Replying to j.swiderski:

I can confirm that this issue no longer exists on FF17.

Hi, it is again reproducible on FF 17.0.1.

I am also using the following code:

var ck = CKEDITOR.instances[editor_id];

if(ck != null){

ck.insertHtml(text);

}

Sometimes it executes without any problem but most of the time, I am getting the same error. Please solve this problem.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy