Drag and Drop aswell as Cut and Paste dysfunctional. JS error.

UNCONFIRMED
Unassigned

Status

()

Core
Editor
UNCONFIRMED
13 years ago
11 years ago

People

(Reporter: Gerald Able, Unassigned)

Tracking

1.8 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

It seems copy and paste of fckeditor does not work as expected. Elements can be cut out of the wysiwyg interface, but cannot be inserted again. Drag and Drop of elements is also affected.

The JavaScript console reported an error, maybe connected to this issue:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMNSHTMLDocument.execCommand]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: ...some intraned url.../fckeditorcode_gecko_2.js :: anonymous :: line 15"  data: no] 



Reproducible: Couldn't Reproduce

Actual Results:  
ctrl-x: Element in wysiwyg view gets cut out
ctrl-v: Element does not appear
js error message appears

Expected Results:  
usual cut and paste behavior

it's a frameset, rendered in quirks mode, UTF-8, text/html

Comment 1

13 years ago
Sounds like bug 309731. Could you attach or paste the line in the JS that's causing this?
Assignee: nobody → mozeditor
Component: General → Editor
Product: Firefox → Core
QA Contact: general
Version: unspecified → 1.8 Branch
(Reporter)

Comment 2

13 years ago
Here is line 15 (yes, all of it ;-) from fckeditorcode_gecko_2.js. Hope this helps.

FCK.RedirectNamedCommands=new Object();FCK.ExecuteNamedCommand=function(A,B){FCKUndo.SaveUndoStep();if (FCK.RedirectNamedCommands[A]!=null) FCK.ExecuteRedirectedNamedCommand(A,B);else{FCK.Focus();FCK.EditorDocument.execCommand(A,true,B);FCK.Events.FireEvent('OnSelectionChange');};FCKUndo.SaveUndoStep();};FCK.GetNamedCommandState=function(A){try{if (!FCK.EditorDocument.queryCommandEnabled(A)) return FCK_TRISTATE_DISABLED;else return FCK.EditorDocument.queryCommandState(A)?FCK_TRISTATE_ON:FCK_TRISTATE_OFF;}catch (e){return FCK_TRISTATE_OFF;};};FCK.GetNamedCommandValue=function(A){var B='';var C=FCK.GetNamedCommandState(A);if (C==FCK_TRISTATE_DISABLED) return null;try{B=this.EditorDocument.queryCommandValue(A);}catch(e) {};return B?B:'';};FCK.PasteFromWord=function(){FCKDialog.OpenDialog('FCKDialog_Paste',FCKLang.PasteFromWord,'dialog/fck_paste.html',400,330,'Word');};FCK.Preview=function(){var A=FCKConfig.ScreenWidth*0.8;var B=FCKConfig.ScreenHeight*0.7;var C=(FCKConfig.ScreenWidth-A)/2;var D=window.open(FCKConfig.PreviewURL, null, null);/*var E;if (FCKConfig.FullPage){if (FCK.TempBaseTag.length>0) E=FCK.GetXHTML().replace(FCKRegexLib.HeadOpener,'$&'+FCK.TempBaseTag);else E=FCK.GetXHTML();}else{E=FCKConfig.DocType+'<html dir="'+FCKConfig.ContentLangDirection+'">'+'<head><title>'+FCKLang.Preview+'</title>'+'<link href="'+FCKConfig.EditorAreaCSS+'" rel="stylesheet" type="text/css" />'+FCK.TempBaseTag+'</head><body>'+FCK.GetXHTML()+'</body></html>';};D.document.write(E);D.document.close();*/};FCK.SwitchEditMode=function(){var A=(FCK.EditMode==FCK_EDITMODE_WYSIWYG);document.getElementById('eWysiwyg').style.display=A?'none':'';document.getElementById('eSource').style.display=A?'':'none';if (A){if (FCKBrowserInfo.IsIE) FCKUndo.SaveUndoStep();document.getElementById('eSourceField').value=(FCKConfig.EnableXHTML&&FCKConfig.EnableSourceXHTML?FCK.GetXHTML(FCKConfig.FormatSource):FCK.GetHTML(FCKConfig.FormatSource));}else FCK.SetHTML(FCK.GetHTML(),true);FCK.EditMode=A?FCK_EDITMODE_SOURCE:FCK_EDITMODE_WYSIWYG;FCKToolbarSet.RefreshModeState();FCK.Focus();};FCK.CreateElement=function(A){var e=FCK.EditorDocument.createElement(A);return FCK.InsertElementAndGetIt(e);};FCK.InsertElementAndGetIt=function(e){e.setAttribute('__FCKTempLabel',1);this.InsertElement(e);var A=FCK.EditorDocument.getElementsByTagName(e.tagName);for (var i=0;i<A.length;i++){if (A[i].getAttribute('__FCKTempLabel')){A[i].removeAttribute('__FCKTempLabel');return A[i];};};return null;};
The call to execCommand(A,true,B) would do it (see URL). Mozilla doesn't accept true as the second param, maybe it should fail silently?
QA Contact: editor
Assignee: mozeditor → nobody
You need to log in before you can comment on or make changes to this bug.