Opened 16 years ago

Closed 15 years ago

#1847 closed Bug (invalid)

Drag picture in Mozilla trashes src

Reported by: Dinu Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5.1
Keywords: Confirmed Firefox Cc:


In mozilla, if you drag an image around, the src changes from url to ../../url; problem if you use absolute urls for images (/path/to/image) it changes to (../../path/to/images) or a base url for the editor and the image disappears. Going to source view and back again, the good src is restored, presumably from _fcksavedurl.

Attachments (1)

fckbug.png (16.9 KB) - added by Dinu 16 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Pending WorksForMe added


I couldn't reproduce your bug. I was dragging images inside the editors text and tables and the links remained the same. Could you please write a step by step instruction to reproduce your bug.


comment:2 Changed 16 years ago by Dinu

Hi, Ok, so here's a list of stept to reproduce the bug: 1) FCK latest from SVN or 2.5.1 or previous release, same behavior 2) Firefox (latest), same behavior on older browser 3) Insert an image in the text 4) Drag the image to another position in the text 5) Open firebug, dom explorer, whatever, look at the img src attribute

I attach a screenshot with firebug, with the problem underlined.


Changed 16 years ago by Dinu

Attachment: fckbug.png added


comment:3 Changed 16 years ago by Martin Kou

Keywords: Confirmed Firefox added; Pending WorksForMe removed


This may be caused by the same underlying issue as in #193 which I'm investigating.

comment:4 Changed 16 years ago by Dinu

Don't know if this helps, but here's an odd thing: the ../../.... src seems to point right whenever a baseUrl isn't specified, so I did the following thing trying to get the logic of this: I tried to load the whole page in an iframe, javascript generated (point being that window has no location). Now the url always changes to ../.. (always twice back, not anymore related to the location or anything). Failed to find any logic... bailing out ;)

comment:5 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: newclosed

This is a known thing with Firefox and that's the reason why we have the _fcksavedurl attribute, so we use that value when outputting the editor data.

In other words, the editor will not output the wrong value, just the original one. If you are looking for using the DOM to manipulate the editor contents, then you must look for the fcksavedurl attribute.

comment:6 Changed 16 years ago by Dinu

I'm not trying to manipulate the editor contents, I just use a setup with mod_rewrite and baseUrl where obviously ../.. dowsn't map the same way as / and so firefox users get disappearing images when dragging.

comment:7 Changed 16 years ago by Frederico Caldeira Knabben

dinu, I didn't understand it. As far as I know, relative URLs are resolved in the browser. The server always receive the request for the full URL, so I don' see how mod_rewrite can be impacted here.

Anyway, this is a strong browser limitation we have faced in the past, and the _fcksavedurl came to make it work... and worked well so far.

comment:8 Changed 16 years ago by Dinu

Here's in more detail:

So the problem is not mod_rewrite, but the fact that FF maps relative urls wrong when having <base href="...">. I think this will always be a problem when using BaseHref in FF, so it's more that a weird instance bug, it breaks the whole BaseHref feature in FF. I took a look at the code, and saw that it's easy to tell when an internal drag operation occurs (FCK.MouseDownFlag in FCK.InitializeBehaviors._ExecDrop), so I wonder if restoring urls from _fcksavedurl at this point would be a cheap fix to this?

comment:9 Changed 15 years ago by Paul Moers

Resolution: invalid
Status: closedreopened
Version: FCKeditor 2.5.1FCKeditor 2.6.4

I have a similar problem. I have relative paths for my images (not relative to the document root, but relative to the BaseHref I have set). Now when I move an image in firefox, the image disappears. But when I go the source view, the right path show up, and when I go back in WYSIWYG mode, the image appears again. In IE this works fine.

See test at

comment:10 Changed 15 years ago by Frederico Caldeira Knabben

Resolution: invalid
Status: reopenedclosed
Version: FCKeditor 2.6.4FCKeditor 2.5.1

Please do not reopen tickets closed 14 months ago. Open new tickets for them instead. you may even make a reference to this ticket if you want.

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