Open Bug 41480 Opened 25 years ago Updated 5 years ago

Support drag & drop of complex selections from browser

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, enhancement, P5)

enhancement

Tracking

()

Future

People

(Reporter: lordpixel, Unassigned)

References

Details

(Keywords: helpwanted)

We have work being done on drag an drop for text and images in Mozilla. Currently its not possible to select text and images at the same time in mozilla. Dragging a selction always selects text. This is how Navigator 4 behaves, an how IE5 behaves on Mac OS but not how IE 5 behaves on Windows where its possible to select both images and text in a drag selection. (Is this worth filing as a seperate bug?) I believe it should be possible to drag complex composite content out of the browser window. e.g. the user should be able to select a range of text, images, plugin items and even structural information like tables and drag it to the desktop. Currently when you drag text to the desktop on Mac OS you get a 'Text Clipping' (for those that don't know Mac OS this is a system level representation for "a piece of text as an object". It can be dragged into other applications, or stored like a file). This is fine so far as it goes, but it doesn't preserve any of the style or formatting. I don't have a Windows machine handy to test on, but I'm guessing the result is a .txt file. What then, should happen, if the user drags complex formatted information out of the browser? BASELINE As a baseline I'd like to see Mozilla save each piece of information seperately. i.e. each image in the selection woul be saved, along with all of the text in a single file similar to what happens now. Medium: Use RTF or something similar to saved styled text (This is what IE5 does on Mac OS. It saves a text file, not a clipping, with styled text. This is stupid, because clippings can contain styled text, so it should be using a clipping. Still, IE4.5 had proper 'drag URL to desktop creates a URL' behaviour and they broke it in IE5 so dragging a URL creates an IE specific shortcut, to lock out other browsers. grrrrr.) ADVANCED The problem would be the lack of a cross platform format for saving the structure and style of the content of the drag. RTF just isn't going to cut it... However there is such a format: http://bugzilla.mozilla.org/show_bug.cgi?id=40873 MHTML files represent a web page saved into a single file, similar to IE5's 'Save entire web page' functionality but using a file rather than a directory. I think it would be really cool if dragging complex content would create an MHTML file on the fly for the section of the page that was dragged. I can see this being quite difficult, as one would need to resolve issues like 'if the user selects half a table and drags it, we need to create a dummy table to hold the contents'. Then there's CSS to consider. Some styles are defined for tags that are nested withing other tags. If the page fragment no longer reflects this nesting, the style would change as the style in the stylesheet would no longer match the same content, because the nesting had been lost. With MHTML support I doubt these sorts of issues are insurmountable though, though shooting for the fragments looking exactly like they did when they were part of a whole page is probably a waste of time. Some inacurracy must be expected. This assumes we don't just want to create a PDF of the dragged content or some other similar format... any thoughts? The baseline functionality is very achievable. The advanced requires some consideration. It may be more difficult than its really worth dealing with. Other references - the Mozilla Drag and Drop specification: (http://www.mozilla.org/docs/refList/user-interface/specs/dragndrop/)
No time left for us to add features on this project, assigning to pinkerton for future, helpwanted
Assignee: trudelle → pinkerton
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: helpwanted
Target Milestone: --- → Future
cc myself note: you can drag an image and text and links all within a selection in the browser into Composer. The real problem here seems to be the OS and format of a single file (MHTML?) or whether to create multiple files as suggested.
not sure how this is a dnd issue, sounds like selection in editor.
Assignee: pinkerton → anthonyd
Okay, I just want to be sure I understand what this feature request is. You want to be able to drag selected content from the browser to the desktop? is this correct? IE doesnt support this functionality, and the only application I can find that does (at least on windows) is Word. Are there any applications that support this on linux (or any unix flavor)? Is this a feature people would even try to use? In my opinion it seems like its the kind of thing I would do by accident all the time and just annoy me. Do Mac users do this kind of thing a lot? Just need some info, Thanks, anthonyd
Severity: enhancement → trivial
Firstly: IE on Windows may not support this (I'll try to remember to check tomorrow), but IE 5 on Mac OS does. If I go to a page in IE5, select a bunch of text and drag (making sure I'm not starting on a link) and let go on the desktop I get a styled Text document (similar to RTF) which attempts to capture the spirit of the text styles on the page. Its far from ideal - i'd prefer HTML because the links would work, and I'd like the images to come too, but its a start. I think IE5 on windows is better than this. Secondly: Yes, Mac apps should (try to) support dragging any content they can to the desktop. Drag and drop is way more pervasive on Mac OS than on Windows and X11. Thirdly: This really isn't so weird - if you intend to support "Save Web Page Complete in One File" and I believe this is a very popular request (see bug 40873 where there's speculation there's 7 duplicates of that bug, or bug) then you've already done most of the work. This is simply saying, I should be able to do "File->Save Web Page Complete in One File" to save the whole page, or simply select the bit I want and drag it to the desktop somewhere. Its just a logical extension of that. Fourthly: We're allowing image drag and drop. We're allowing link drag and drop. We're allowing text drag and drop (certainly on Mac OS, maybe others). What if I select an image and some text... I shouln't be able to drag and drop this? What if I select a table and drag that? I shouldn't be able to? I'm not making this point to be beligerant, I'm just pointing out that there's no obvious line to draw where this is clearly unreasonable. So if we can't draw a reasonable line, it must be reasonable to allow someone to drag pretty much anything and have Mozilla make a best effort to save it in some format, be it MHTML or whatever. Phew! Think that covers it. Anyone else?
Maybe I'm wrong here (please forgive me) but you can select multiple items so editor/selection is done for the work we are dicussing that needs to be done. Seems like this should really go to don's team...
Assignee: anthonyd → don
Severity: trivial → enhancement
Summary: [RFE] Support drag and drop of complex selections from browser → [RFE] Support drag & drop of complex selections from browser
Since Don has left, Vishy is taking his bugs in bulk, pending reassignment. thanks, Vishy
Assignee: don → vishy
-> drag-and-drop
Assignee: vishy → blakeross
Component: XP Toolkit/Widgets → XP Apps: Drag and Drop
QA Contact: jrgm → tpreston
Depends on: 82118
I created a tracking (meta) bug 82118 to track these kinds of bugs and to unify the efforts. Maybe a few duplicates will also become aparent this way - then we can assign the keyword MostFreq.
Removing dependancy to bug 82118 as it should be the other way round (bug 82118 depends on this bug).
No longer depends on: 82118
Blocks: 82118
Status: NEW → ASSIGNED
qa contact -> pmac
QA Contact: tpreston → pmac
Summary: [RFE] Support drag & drop of complex selections from browser → Support drag & drop of complex selections from browser
Assignee: bross2 → nobody
Status: ASSIGNED → NEW
QA Contact: pmac
QA Contact: drag-drop

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority and severity.

If you have reason to believe this is wrong, please write a comment and ni :jstutte.

Severity: normal → S4
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.