Closed Bug 39326 Opened 25 years ago Closed 25 years ago

D&D: need a way to distinguish btw source/dest locations

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: Brade, Assigned: mikepinkerton)

References

Details

(Keywords: polish, Whiteboard: nsbeta3+)

I need a way to distinguish or identify the source location of a drag from the drop location. For example, dropping a link on top of itself in the same browser window shouldn't load that link. Another example: in editor, we need to know whether to "cut" the selection on drag/drop or whether to "copy" the selection. This is critical for d&d in editor.
annotating as a feature. is the document enough, or do you need more than that?
Status: NEW → ASSIGNED
Summary: D&D: need a way to distinguish btw source/dest locations → [feature] D&D: need a way to distinguish btw source/dest locations
Target Milestone: --- → M20
This is 4.x parity. Yes, just having a unique window identifier should be sufficient (for knowing source/destination window). Also, a flag would do the trick too: isSameWindow (at least in my case).
Keywords: 4xp
Mass-moving all M20-M30 XPToolkit bugs to Future
Target Milestone: M20 → Future
c'mon, this ain't a feature. Lack of this API prevents us from doing drag and drop according to Apple HI specs. It's a bug, and I'm marking it for beta3.
Keywords: nsbeta3
Summary: [feature] D&D: need a way to distinguish btw source/dest locations → D&D: need a way to distinguish btw source/dest locations
*** Bug 44209 has been marked as a duplicate of this bug. ***
Blocks: 45607
Blocks: 45514
Just as a side note it would be handy to not only know the window for source and destination, but where it was dragged from (a textarea, a paragraph, what) possibly the id of that section also??? A bit extronous but not all that complex for the added benefits.
Whiteboard: nsbeta3+
Keywords: polish
Target Milestone: Future → M18
i'm going to store the document in the drag service. from there you can get the window if needed. this will allow us to determine, for example, that you can drag from the sidebar into the content area (they are different documents) but you can't drag a link from the content area and drop it on the same content area. if i just gave the window, we wouldn't be able to distinguish those two cases. objections? tough ;)
Don't you need to store the presShell, or docShell, or some view-related thing? You might have two views on the same document, and still want to drag-copy between them.
i don't think we even can have two views of the same document, even though that was a design goal...in practice i don't think it's possible anymore.
actually, if we are dragging within two views of the same document, I'd think that we'd want to always cut (unless the user holds the special key to copy, in which case we wouldn't care if they were in the same window or not).
api is there. i did a little in navigatorDD.js to stop loading if url dropped is from the same content area and it works...needs to be done correctly to handle framesets, though.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.