RESOLVED FIXED 19385
[Qt] Dragging and dropping an image in edit mode does not work
https://bugs.webkit.org/show_bug.cgi?id=19385
Summary [Qt] Dragging and dropping an image in edit mode does not work
Jonathon Jongsma (jonner)
Reported 2008-06-03 20:04:25 PDT
Steps to reproduce: - make page editable - click on and drag an image - drop the image in a different spot on the page (e.g. in the middle of a paragraph somewhere) results: - the image is deleted from its original position, but it is not inserted into the document at the new position expected behavior: - the image should be moved from the old position to the new drop position
Attachments
Possible fix to insert the image into the editable document at the drop location (2.03 KB, patch)
2008-06-03 20:06 PDT, Jonathon Jongsma (jonner)
eric: review-
A simple test case (925 bytes, text/html)
2008-07-28 07:12 PDT, Jonathon Jongsma (jonner)
no flags
Patch (1.49 KB, patch)
2011-04-06 08:17 PDT, Benjamin Poulain
no flags
Jonathon Jongsma (jonner)
Comment 1 2008-06-03 20:06:41 PDT
Created attachment 21489 [details] Possible fix to insert the image into the editable document at the drop location Basically, when dragging an image it was saving the image data to the clipboard, but to move it within an editable html document, we want to save the html fragment in the clipboard and paste that into the new location. This patch just adds the html fragment as an additional format in the drag clipboard.
Mark Rowe (bdash)
Comment 2 2008-06-03 20:34:18 PDT
This already behaves correctly on the Mac, which suggests to me that the fix should not be in core cross-platform code but in GTK-specific client classes.
Eric Seidel (no email)
Comment 3 2008-07-24 11:43:52 PDT
Comment on attachment 21489 [details] Possible fix to insert the image into the editable document at the drop location I just tested: 1. open "about:blank" 2. type "javascript:document.designMode="on"" 3. Drag the google.com logo from google.com onto the now-editable about:blank document. it worked for me on the Mac. Suggesting that this is a gtk-only issue? Please provide a test case so we can verify if your fix affects other platforms.
Jonathon Jongsma (jonner)
Comment 4 2008-07-28 07:12:51 PDT
Created attachment 22520 [details] A simple test case Thanks for looking at this Eric. I think your test case might be a slightly different situation than the bug I am seeing, so I'm attaching a simple test case to illustrate the problem I'm seeing (sorry for not attaching this initially). By the way, I'm seeing this issue in Qt, and it's possible that it only affects the Qt port, but from my reading of the source code, this seems unlikely to me.
Alexey Proskuryakov
Comment 5 2011-01-07 15:49:15 PST
If I understand what this bug is about, the attached test case also works fine in Safari 5 on Mac OS X. The image is successfully moved, and all attributes (like ALT) are preserved.
Benjamin Poulain
Comment 6 2011-04-06 08:17:36 PDT
Andreas Kling
Comment 7 2011-04-08 11:23:50 PDT
Comment on attachment 88427 [details] Patch r=me
WebKit Commit Bot
Comment 8 2011-04-08 13:36:39 PDT
Comment on attachment 88427 [details] Patch Clearing flags on attachment: 88427 Committed r83338: <http://trac.webkit.org/changeset/83338>
WebKit Commit Bot
Comment 9 2011-04-08 13:36:44 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.