Closed
Bug 68058
Opened 25 years ago
Closed 25 years ago
Dropping dragged webpage text yields "null"
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, defect, P1)
Core
DOM: Copy & Paste and Drag & Drop
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: tarahim, Assigned: bugzilla)
References
Details
(Keywords: regression, Whiteboard: [br])
Attachments
(3 files)
|
685 bytes,
patch
|
Details | Diff | Splinter Review | |
|
3.43 KB,
patch
|
Details | Diff | Splinter Review | |
|
718 bytes,
patch
|
Details | Diff | Splinter Review |
DnD of a link to text area of this bugzilla form is broken.
DnD from Mail message to another window is broken.
DnD withing textarea of this bugzilla form is broken.
20010207008 MTrunk.
| Assignee | ||
Comment 1•25 years ago
|
||
This is the result of Ben's d&d api changes. -> ben
Assignee: vishy → ben
OS: Mac System 9.x → All
Hardware: Macintosh → All
Summary: Drag and Drop of URL broken again. → URLs cannot be dropped anywhere
| Assignee | ||
Updated•25 years ago
|
Comment 2•25 years ago
|
||
this regression causes failure of about half the D&D testcases
<http://www.mozilla.org/quality/browser/front-end/testplans/browser-drag-and-drop.html>.
If we can get a fix for 0.8 that would totally rock
Whiteboard: critical for 0.8
Updated•25 years ago
|
QA Contact: sairuh → tpreston
Comment 5•25 years ago
|
||
What's the deal here? Are we waiting on Ben? This is a 0.8 bug so we should
try and get moving on it. I'd hate to lose traction after the 0.8 branch is cut.
Comment 6•25 years ago
|
||
Hmm.. first time I tried to drag static text to a editfield here the textfield's
value just changed to "null", then I couldn't drag and drop at all.
| Assignee | ||
Comment 7•25 years ago
|
||
Yes, more is broken. Editors within pages aren't accepting drags, and some
drop data is null.
Summary: URLs cannot be dropped anywhere → Most URL and text d&d is broken
Comment 8•25 years ago
|
||
Comment 9•25 years ago
|
||
r=blizzard
Comment 10•25 years ago
|
||
Comment 11•25 years ago
|
||
I don't see alecf around, but I think I understand enough to say
r/sr=brendan@mozilla.org. Get an r= on that final patch (blizzard may be
willing to supply it again), and then get this fix in and move any remaining
problems into 0.9 bug(s). Thanks,
/be
| Assignee | ||
Comment 12•25 years ago
|
||
This patch does not fix the problem on Windows, which doesn't even let you drop
links into textfields anywhere. But I believe that might be an editor
problem. Joe or Kathy, could you shed some light here?
And drags of webpage text to the url bar still yields 'null' with this patch
applied, which is probably an xpapps problem...
| Assignee | ||
Comment 13•25 years ago
|
||
Backing out Ben's dnd lib and corresponding call site patches has yielded the
following:
* Ben's changes caused the problem that the url bar doesn't let you drop links
* Ben's changes caused the problem that dropping text in the url bar
yields 'null'
* Ben's changes did NOT cause the problem that textfields aren't accepting
drags of content from the same page
However, when I got rid of the following check:
if (aDragSession.sourceDocument == window._content.document)
aDragSession.canDrop = false;
(which is supposed to prevent dropping content dragged from a page into the
same page, although that never prevented textfield dropping in the past) with
Ben's changes applied, dropping into textfields on the same page still didn't
work...whereas when I got rid of it after backing out Ben, dropping into
textfields *did* work. It's being hit in both cases.
brade's recent changes to nsTextEditorDragListener::DragOver() seemed to have
no effect in any case. In all cases,
if ( flavorSupported ) {
dragSession->SetCanDrop(PR_TRUE);
was hit (the flavor was supported).
| Assignee | ||
Comment 14•25 years ago
|
||
I have confirmed that the problem with editors not accepting link and text
drops was caused by Joe's fix for bug 66290. Filed bug 68457 for that issue.
This bug remains open for text drags to the url bar resulting in 'null', and
another xpapps problem about dropping urls resulting in link text instead of
url (which Ben sees, but I don't, since dropping urls seems to be broken on
Windows as mentioned above).
| Assignee | ||
Comment 15•25 years ago
|
||
Eeek...or maybe not.
With both Ben and Joe's changes backed out, everything worked fine. When I
reinstated Ben's dnd changes, it all didn't work again...Maybe I was smoking
something earlier.
Ben, it looks like this is all you. Please try it on your Windows box.
| Assignee | ||
Comment 16•25 years ago
|
||
Ben and I have a fix in hand for most of this stuff. I'm still investigating
why dropping into gfx textfields gives 'null' on Windows only. We will not be
fixing the inability to drop content from a page into a textfield on the same
page for .8. r=timeless sr=ben
Comment 17•25 years ago
|
||
OK, let's get this into the branch. a=asa.
| Assignee | ||
Comment 18•25 years ago
|
||
All that we plan on fixing for .8 has been checked in. I'd still like to find
why dropping plain text is 'null' on Windows, but I'll leave this off the radar
until I do. I stepped through, and it certainly seems like everything is being
passed correctly.
Part of the fix involved commenting out places where we set the drag action to
DRAGDROP_ACTION_LINK, which becomes DROPEFFECT_LINK
(http://msdn.microsoft.com/library/psdk/com/oen_a2z_7nsk.htm). For some
reason, passing DROPEFFECT_LINK directly into ::DoDragDrop (see
http://msdn.microsoft.com/library/psdk/com/ofn_a2o_706o.htm and
http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsDragService.cpp#144
) is providing the wrong cursor feedback on Windows, and disallowing the drop.
Unless this is a problem on Windows' end, we'll need pink's masterful expertise
here, but I guess that can be another bug.
Keywords: mozilla0.8
OS: All → Windows 2000
Hardware: All → PC
Summary: Most URL and text d&d is broken → Dropping dragged webpage text yields "null" on Windows
Whiteboard: critical for 0.8
| Reporter | ||
Comment 19•25 years ago
|
||
This is still broken in 2001021204 Mac build.
Comment 20•25 years ago
|
||
I have a simple fix for this on Macintosh (which should probably be applied
elsewhere). Ben--can you review it and get someone else to sr= it (or vice
versa). Does this fix the problem on Windows too?
Index: mozilla/xpfe/communicator/resources/content/contentAreaDD.js
===================================================================
RCS file: /cvsroot/mozilla/xpfe/communicator/resources/content/contentAreaDD.js,v
retrieving revision 1.9
diff -c -2 -r1.9 contentAreaDD.js
*** contentAreaDD.js 2001/02/05 07:42:40 1.9
--- contentAreaDD.js 2001/02/12 17:23:38
***************
*** 140,143 ****
--- 140,146 ----
onDragOver: function (aEvent, aFlavour, aDragSession)
{
+ if (aEvent.getPreventDefault())
+ return;
+
// if the drag originated w/in this content area, bail early. This
avoids loading
// a URL dragged from the content area into the very same content area
(which is
Comment 21•25 years ago
|
||
| Reporter | ||
Comment 22•25 years ago
|
||
*** Bug 68896 has been marked as a duplicate of this bug. ***
Comment 23•25 years ago
|
||
So are any of the attached patches usable for the trunk too?
Nominating for mozilla 0.9
Keywords: mozilla0.9
Comment 24•25 years ago
|
||
Adding patch keyword. It's three lines - let's get it checked in.
Gerv
Keywords: patch
| Reporter | ||
Comment 25•25 years ago
|
||
Since it has not been checked into trunk builds, changing OS and Platform to All/All
OS: Windows 2000 → All
Hardware: PC → All
Summary: Dropping dragged webpage text yields "null" on Windows → Dropping dragged webpage text yields "null"
| Assignee | ||
Comment 26•25 years ago
|
||
Looks good, fixes the case where links can't be dropped into textfields on the
same pages (still seeing null problem). r=blake
Comment 27•25 years ago
|
||
Kathy explained this one to me on IRC.
a=ben@netscape.com
Comment 28•25 years ago
|
||
Marking nsbeta1+, p1, mozilla0.9. Kathy, if you can, check your patch in,
please! Can someone tell what's left to fix in this bug?
| Reporter | ||
Comment 29•25 years ago
|
||
You still can not drag text of the body into textarea of this form in 030911 build.
Comment 30•25 years ago
|
||
brade: ping :-)
Gerv
| Assignee | ||
Comment 31•25 years ago
|
||
Guys, stop bothering brade, I checked in her fix awhile ago :-)
(sorry, should have mentioned that)
Comment 32•25 years ago
|
||
Was that after hiratu reported his problem, or has he seen another bug?
Gerv
| Reporter | ||
Comment 33•25 years ago
|
||
Currently in 2001032418 build, selected text in the body can not be dragged at all.
| Reporter | ||
Comment 34•25 years ago
|
||
Seems like fixed by bug 68707.
I can confirm it fixed in 2001041704 build.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Whiteboard: x for Mac D&D pr
| Assignee | ||
Comment 35•25 years ago
|
||
The problem mentioned in the summary of this bug isn't fixed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Reporter | ||
Comment 36•25 years ago
|
||
Interestingly, if there is a link in a text line, the link is dropped whether
the dragged text contains the link or not.
| Assignee | ||
Updated•25 years ago
|
Target Milestone: mozilla0.9 → mozilla0.9.1
| Assignee | ||
Comment 37•25 years ago
|
||
Terri, can you give me a more narrow idea of when this started occurring? We
know it was sometime around 2/9 or before.
Can anyone confirm that this does/doesn't happen on all platforms? Due to some
investigation ben and I did (that seemed to show that we're confusing text/x-
moz-url and text/html somewhere along the line), I think this sucker is
pink's...
Keywords: mozilla0.9
| Assignee | ||
Comment 38•25 years ago
|
||
pink, somewhere past xpapps we appear to be misinterpreting the flavor. If I
don't add the data for text/x-moz-url, this works perfectly. If I leave it in,
the dragged text is suddenly text/x-moz-url (or it's still the correct flavor,
but we're incorrectly using the data provided for text/x-moz-url). This
explains why what we're dropping isn't actually just "null", but "null" \n
[selection]. Ben reports seeing similar oddities elsewhere, so passing to you.
Assignee: blakeross → pinkerton
Status: REOPENED → NEW
| Assignee | ||
Comment 39•25 years ago
|
||
Well, a(n apparently incorrect) newsgroup post led me to this minor revelation
today: whichever flavour we add first in onDragStart is the flavour that it's
interpreted as later on. This seems to be an xpapps problem after all; Ben
checked in his nsDragAndDrop api changes on February 4th, and this was reported
on February 7th. -> Ben
(I'm glad it took me three months to rediscover that this part of the bug
belongs to Ben, considering I told myself that on 2/10)
Assignee: pinkerton → ben
| Assignee | ||
Comment 40•25 years ago
|
||
Given that this is a regression and affects many areas of d&d, I'd prefer to
see this get fixed for 0.9.1. The fix is easy anyways, and I'll probably get
to it within this week.
Whiteboard: x for Mac D&D pr → [br]
Target Milestone: mozilla0.9.2 → mozilla0.9.1
| Reporter | ||
Comment 41•25 years ago
|
||
DND of links broke down in 2001050904 trunk for Mac again.
Links are not draggable to another window or into textarea of a form like this one.
| Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 43•25 years ago
|
||
Fix checked in.
Comment 44•25 years ago
|
||
Verified mac build 2001053009
Verified w98 build 2001053004
Verified linux build 2001053008 (Can't drag to Instant Messanger, will open new
bug on that0
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•