Opened 17 years ago

Closed 17 years ago

Last modified 14 years ago

#353 closed Bug (invalid) Editor in ModalPopupExtender throws error in Firefox

Reported by: BenHill Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.4.2
Keywords: Pending Cc:


I am using the ModalPopupExtender from the new AJAX Toolbox Controls.

  1. Create a custom control that adds FCKEditor
  2. Add that control to an asp panel
  3. Assign that panel to the PopupControlID property of the ModalPopupExtender
  4. Assign a button to load the MPE
  5. Fire up the app - click on the the button to load the Editor

This creates the following error in javascript - the editor isn't editable unless you switch to source mode and back:

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://localhost/MyApp/script/fckeditor/editor/js/fckeditorcode_gecko.js :: anonymous :: line 31" data: no]

Change History (10)

comment:1 Changed 17 years ago by BenHill

i have determined that the error is coming from this command: FCK.EditorDocument.execCommand(A,false,B);

comment:2 Changed 17 years ago by BenHill

any help here would be great. this is the last piece I need resolved before deploying this on my company's website.

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Component: Server : ASP.NetGeneral
Milestone: FCKeditor.Net 2.3
Owner: Frederico Caldeira Knabben deleted

This happens due to a known Firefox bug. Check out the Test Case 4:

comment:4 Changed 17 years ago by BenHill

roger. Is there a workaround?

comment:5 Changed 17 years ago by BenHill

I have tried a couple things.

Adding this js around the error-producing line:

try {


} catch(err) {

FCK.MakeEditable(); FCK.EditorDocument.execCommand(A,false,B);


...that fixes the problem, but only after the first operation (eg make some text bold) is called and doesn't fire.

I have also tried adding a client event to the button firing the ModalPopupExtender, but I can't seem to get a reference to the FCK object (I have reviewed your api documentation, still no luck).

So I'm a little stuck.

comment:6 Changed 17 years ago by rl

Had an error like this under firefox/iceweasel 2.003: A not editable editor. When I try to switch to "bold" the I got the exception. The application I used, loads the fckeditor.html in an iframe.

My workaround to fix the uneditable: I disabled the resizing in Window_OnResize() fuction:

--- editor/fckeditor.html
+++ editor/fckeditor.html
@@ -183,6 +183,7 @@
        function Window_OnResize()
                if ( FCKBrowserInfo.IsOpera )
                        return ;

This workaround doesn't work on a directly loaded fckeditor.html.

Maybe it's a timing problem on the gecko-engine? I got 2 additional errors on the console while load:

Error: this._Window.document.body has no properties 
Source File: http://localhost/phpgwapi/js/fckeditor/editor/_source/classes/fckpanel.js Line: 57


Error: this.LinkedField has no properties
Source File: http://localhost/phpgwapi/js/fckeditor/editor/_source/internals/fck.js Line: 36

see also: [ ]

comment:7 in reply to:  6 Changed 17 years ago by rl

Sorry, my version of FCKeditor is 2.4.1 Build 14797

comment:8 in reply to:  6 Changed 17 years ago by rl

Replying to rl:

My workaround to fix the uneditable: I disabled the resizing in Window_OnResize() fuction:


Hm ... Now I'm not sure, if these change made the effect. Also when pressing the "New" Button, the editor become functionable.

... so the workaround above is obsolete for me!

comment:9 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Pending added

As commented before, a solution for it can be found at Test Case 4: source:FCKeditor/trunk/_testcases/004.html

Look for the MakeEditable function.

Does it closes this problem?

comment:10 Changed 17 years ago by Alfonso Martínez de Lizarrondo

Resolution: invalid
Status: newclosed


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