#353 closed Bug (invalid)
ASP.net: 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: |
Description
I am using the ModalPopupExtender from the new AJAX Toolbox Controls.
- Create a custom control that adds FCKEditor
- Add that control to an asp panel
- Assign that panel to the PopupControlID property of the ModalPopupExtender
- Assign a button to load the MPE
- 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 18 years ago by
comment:2 Changed 18 years ago by
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 18 years ago by
Component: | Server : ASP.Net → General |
---|---|
Milestone: | FCKeditor.Net 2.3 |
Owner: | Frederico Caldeira Knabben deleted |
This happens due to a known Firefox bug. Check out the Test Case 4:
source:FCKeditor/trunk/_testcases/004.html
comment:5 Changed 18 years ago by
I have tried a couple things.
Adding this js around the error-producing line:
try {
FCK.EditorDocument.execCommand(A,false,B);
} 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 follow-ups: 7 8 Changed 18 years ago by
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() { +return; 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
and
Error: this.LinkedField has no properties Source File: http://localhost/phpgwapi/js/fckeditor/editor/_source/internals/fck.js Line: 36
see also: [http://sourceforge.net/mailarchive/message.php?msg_id=45EE1A5F.6000904%40psavonline.com ]
comment:8 Changed 18 years ago by
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 18 years ago by
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?
i have determined that the error is coming from this command: FCK.EditorDocument.execCommand(A,false,B);