Closed
Bug 383252
Opened 17 years ago
Closed 17 years ago
Cannot drag / drop URL or link onto tabbar
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: base12, Assigned: jag+mozilla)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/20070604 SeaMonkey/2.0a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/20070604 SeaMonkey/2.0a1pre
I can not highlight a URL and drop it onto the tab bar, nor can I drag a link and drop it onto the tab bar.
Reproducible: Always
Steps to Reproduce:
1a.Highlight a URL in a Web page and drag it to the tab bar, OR
1b.drag a link to the tab bar.
2.Drop it onto an empty space on the tab bar or onto an existing tab.
3.
Actual Results:
Nothing happens.
Expected Results:
If the URL or link is dropped onto an empty spot on the tab bar, a new tab should open. If the URL or link is dropped onto an existing tab, the new page should load in the tab.
Comment 1•17 years ago
|
||
It seems that drag & drop generally is broken. Even dropping a html-file into browser window does not open the document. Also drag & drop of extensions into browser window has no effect.
Comment 2•17 years ago
|
||
When dropping a file to the browser window error console says:
Error: nsDragAndDrop.dragDropSecurityCheck is not a function
Source File: chrome://communicator/content/contentAreaDD.js
Line: 66
Comment 3•17 years ago
|
||
This is a suiterunner regression.
Assignee: general → guifeatures
Blocks: suiterunner
Status: UNCONFIRMED → NEW
Component: General → XP Apps: GUI Features
Ever confirmed: true
OS: Windows XP → All
QA Contact: general
Version: unspecified → Trunk
Comment 4•17 years ago
|
||
And:
JavaScript error: chrome://navigator/content/tabbrowser.xml, line 1574: nsDragAndDrop.dragDropSecurityCheck is not a function
Comment 5•17 years ago
|
||
I just checked nsDragAndDrop.js in toolkit.jar included in SM1.5 and SM2:
SM1.5 nsDragAndDrop.js has dragDropSecurityCheck included but SM2 not. Adding the function to nsDragAndDrop.js in SM2 toolkit.jar restores the drag&drop functionality.
Firefox includes the SM2 nsDragAndDrop.js
So it seems that we have to use our own (old) nsDragAndDrop.js or place dragDropSecurityCheck where Firefox includes it (in tabbrowser.xml ?).
Assignee | ||
Comment 7•17 years ago
|
||
Per bug 285438 comment 33 I'm moving this to what I think is a better place for this function, and it'll fix this bug without suite having to duplicate the function in its tabbrowser. While I'm not dead set on it living in nsDragAndDrop, I would like it to be in a place where suite and FF can both use it.
BTW, I took this from suite's old nsDragAndDrop, but a diff against the method in tabbrowser shows the body is the same except for white-space differences and different line-breaking in the comment.
Comment 8•17 years ago
|
||
(In reply to comment #7)
> BTW, I took this from suite's old nsDragAndDrop, but a diff against the method
> in tabbrowser shows the body is the same except for white-space differences and
> different line-breaking in the comment.
As I compared the both versions last time I found another difference in line 397:
SeaMonkey version: var sel= tree.view.selection;
Toolkit version: var sel= obo.view.selection;
I don't know whether you have to take care of this.
Assignee | ||
Comment 9•17 years ago
|
||
Sven: nah. |tree.view| is a shorthand property for |tree.treeBoxObject.view|, and |obo| is |tree.treeBoxObject|, so it's all the same.
Assignee | ||
Updated•17 years ago
|
Attachment #273250 -
Flags: review? → review?(mconnor)
Comment 10•17 years ago
|
||
Comment on attachment 273250 [details] [diff] [review]
Move dragDropSecurityCheck from tabbrowser to nsDragAndDrop
r=me, though I really wish we were using aURL instead of aURI for strings, makes a lot of things easier to parse
Attachment #273250 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 11•17 years ago
|
||
mconnor, how about this? It replaces aUri with aDraggedText, gets rid of urlStr (just re-use the aDraggedText var), and does some early returns to get the text less indented.
Also, your r= suffices, right? Or should I get sr on this?
Attachment #273715 -
Flags: review?(mconnor)
Comment 12•17 years ago
|
||
> diff -u -r1.233 tabbrowser.xml
...
> - }
> + nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, aUri);
If you have changed all the callers, why is this method still needed in tabbrowser.xml?
Assignee | ||
Comment 13•17 years ago
|
||
Philip: I put in the forwarder in case extensions are using it (unlikely? Google didn't turn anything up), but I'm more than happy to remove it.
mconnor, your take?
Comment 14•17 years ago
|
||
Google codesearch shows only one hit outside the mozilla.org cvs:
<http://www.google.com/codesearch?q=dragDropSecurityCheck&hl=en&btnG=Search+Code>
And this is piro's own reimplementation in an essentially obsolete and orphaned extension.
Unfortunately neither mozdev nor AMO has searchable MXR/LXR.
Comment 15•17 years ago
|
||
You can file a bug in addons.mozilla.org::Addons to request a grep of all the extensions on AMO that use of the function (see e.g. bug 388393).
Comment 16•17 years ago
|
||
Comment on attachment 273715 [details] [diff] [review]
Same patch, but s/aUri/aDraggedText/g
I like this much much better, cleaner to read than the old impl, thanks!
Attachment #273715 -
Flags: review?(mconnor) → review+
Assignee | ||
Updated•17 years ago
|
Attachment #273250 -
Attachment is obsolete: true
Assignee | ||
Comment 17•17 years ago
|
||
Checked in. I've filed bug 389624 per comment 15, and I'll deal with removing that method from tabbrowser once I get an answer there.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 18•17 years ago
|
||
Oops. I forgot I can't check into browser/. I'll get that checked in soon (thank $DEITY I kept the forwarding method in tabbrowser).
Assignee | ||
Comment 19•17 years ago
|
||
Ignore the previous comment. I was looking at a bonsai query that didn't include browser/ :-)
Assignee | ||
Comment 20•17 years ago
|
||
Philip: according to bug 389624 about 4 extensions are using this method on tabbrowser. I'll leave it in for now.
You need to log in
before you can comment on or make changes to this bug.
Description
•