#4178 closed Bug (fixed)
FCK.GetRealElement fails after copy-and-paste on embedded flash
Reported by: | Gergely Zayzon | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | FCKeditor 2.6.4 |
Keywords: | Confirmed | Cc: |
Description
FCK.GetRealElement() fails to process the document, when the source of copying is an another FCKEditor instance, the text contains an embedded flash video with width and height defined, and you paste it into an another FCKEditor instance.
The A.getAttribute('_fckrealelement') returns a 0 value (that I believe is normal), but the FCKTempBin.Elements array probably has no corresponding item, therefore e becomes undefined, making the following e.width statement fail with a JavaScript error. The consequences are the following:
- You can not view the source of the copied document;
- You can proceed to saving the underlying form, but the initial value is sent with the request - if the editor were empty, an empty string is sent;
Reproduce:
- Add an embedded flash movie into an Editor A;
- Set its width and height properties to something which makes sense;
- Select the contents of the Editor A, and copy it to the clipboard;
- Paste the contents of the clipboard into an another editor instance (Editor B);
- Try to view the source or get the contents of the Editor B (by JavaScript, or by submitting the underlying form);
For the sake of completeness; when nor the width and height are set, the embedded flash is simply discarded, it is not retained over the copy and paste operation (but at least the editor keeps working).
Change History (3)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added; flash GetRealElement copy paste width height removed |
---|---|
Milestone: | → CKEditor 3.0 |
Owner: | set to Frederico Caldeira Knabben |
Status: | new → assigned |
comment:2 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 15 years ago by
Great, noticed in the meantime that I missed a major version change, and honestly; it looks great ;-)
I'd suggest to change the
if (A.getAttribute('_fckflash'))
into
if (e&&A.getAttribute('_fckflash'))
in the old version within FCK.GetRealElement(), this ensures that the editor is not blocked (but the flash is discarded) when copying content with embedded flash.
That's a limitation we have with the V2. We have changed the system for V3 exactly because of this issue, and it works well now.
I've added the changelog entry for it with [4046].