Opened 17 years ago
Closed 16 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: |
Description
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)
Change History (11)
comment:1 Changed 17 years ago by
Keywords: | Pending WorksForMe added |
---|
comment:2 Changed 17 years ago by
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 2.0.0.12 (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.
Dinu
comment:3 Changed 17 years ago by
Keywords: | Confirmed Firefox added; Pending WorksForMe removed |
---|
Confirmed.
This may be caused by the same underlying issue as in #193 which I'm investigating.
comment:4 Changed 17 years ago by
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 17 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
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 17 years ago by
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 17 years ago by
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 17 years ago by
Here's in more detail:
- the script resides at http://server/path/to/script[[BR]]
- it has uploaded files at http://server/path/to/script/Upload[[BR]]
- it uses mod_rewrite to serve virtual addresses such as http://server/path/to/script/virtual/page/address[[BR]]
- in FCKeditor, I set FCKConfig.BaseHref='http://server/path/to/script'[[BR]]
- now, when editing, if I insert a picture it has the url Upload/image/picture.ext
- when I drag the picture around, the URL changes to ../../Upload/image/picture.ext, which is mapped to http://server/path/Upload/image/picture.ext (to/script/ missing)
- as a result, picture disappears
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 16 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Version: | FCKeditor 2.5.1 → FCKeditor 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 http://www.saulmade.nl/fckeditorTest
comment:10 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
Version: | FCKeditor 2.6.4 → FCKeditor 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.
Hi!
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.
Thanks!