Closed Bug 372271 Opened 17 years ago Closed 17 years ago

Drag and dropping of hyperlink from 2.0 to trunk URL bar results in malformatted URL

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3 beta2

People

(Reporter: stevee, Assigned: ted)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.2pre) Gecko/2007022403 BonEcho/2.0.0.2pre
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a3pre) Gecko/2007030104 Minefield/3.0a3pre

1. New profile for Firefox 2.0; start with -no-remote
2. New profile for Firefox Trunk; start with -no-remote
3. In Firefox 2.0, visit news.bbc.co.uk
4. Under the news ticker there will be a leading news story with a picture (203x152 px). Next to it will be the story title as a clickable link ("Anger at public sector pay offer"). Drag the link from Firefox 2.0 and drop it in the URL bar of Firefox Trunk.

Expected:
URL appears in URL bar, and firefox goes to page. (eg: http://news.bbc.co.uk/1/hi/uk_politics/6408061.stm)

Actual:
URL appears in URL bar along with the title of the story. (eg: http://news.bbc.co.uk/1/hi/uk_politics/6408061.stmAnger%20at%20public%20sector%20pay%20offer).

Steps to reproduce also occur if you drag the favicon from the Firefox 2.0 URL bar and drop it on the Firefox Trunk URL bar. Works fine if you highlight the text in Firefox 2.0's URL bar and drag and drop that text onto the Firefox Trunk URL bar.
Summary: Drag and droping of hyperlink from 2.0 to trunk resuts in malformatted URL → Drag and dropping of hyperlink from 2.0 to trunk URL bar resuts in malformatted URL
Component: General → Drag and Drop
Product: Firefox → Core
QA Contact: general
Summary: Drag and dropping of hyperlink from 2.0 to trunk URL bar resuts in malformatted URL → Drag and dropping of hyperlink from 2.0 to trunk URL bar results in malformatted URL
Component: Drag and Drop → General
Product: Core → Firefox
QA Contact: general
This is from bug 23485.  Specifically, it's the manifestation of bug 321279 on the branch.  I don't see the value in trying to work around this, since it requires dragging and dropping between two different versions.
This is not limited to links dragged between different Firefox versions, it also affects link dragging from Thunderbird to Firefox, for example between Thunderbird 1.5 and latest Firefox trunk build, and possibly other Gecko based apps too. This wont be fixed by itself until Thunderbird leaves the 1.8 branch, e.g. maybe Thunderbird 3.0.
Depends on: 321279
Flags: blocking-firefox3?
It will affect any Gecko based apps which don't munge their own links. ChatZilla has the same problem dragging from us on a stable XULRunner (1.8.0/1.8.1) to trunk Firefox/Thunderbird. So yes, we would like to see this fixed.
Gijs: if you have the spare cycles to make a branch patch from the patch on bug 321279, I'd appreciate it.  It's a pretty small patch.
Flags: blocking-firefox3? → blocking-firefox3+
So I've already updated the patch for branch on bug 321279, but roc already mentioned he doesn't think it's suitable for branch. I also realized that the patch doesn't solve anything unless we release all the branch products (Thunderbird, Firefox, Sunbird, XULRunner, ...) at the same time, and people actually update them. So if anyone can come up with a better approach, that would be good, I think.
Target Milestone: --- → Firefox 3 beta1
Target Milestone: Firefox 3 M7 → Firefox 3 M8
Target Milestone: Firefox 3 M8 → Firefox 3 M9
Gotta fix this I guess :-(
Assignee: nobody → ted.mielczarek
Just so I don't lose it:
http://mxr.mozilla.org/seamonkey/source/extensions/irc/xul/content/handlers.js#3090  ChatZilla has some funky handling for this, Gijs says the textbox doesn't get all the available data flavors when a drop happens.

We could fix this in the content area DND code pretty easily:
http://mxr.mozilla.org/mozilla/source/browser/base/content/browser.js#4350
but we'd probably be in the same boat as CZ for the actual url bar.
Target Milestone: Firefox 3 M9 → Firefox 3 M10
Attached patch fix some stuffSplinter Review
Ok, so this is a two-part change.  
1) In nsClipboard::GetFormat, translate text/x-moz-url to CFSTR_INETURL.  Since we didn't do this before, you couldn't actually get at text/x-moz-url data dragged from an external app.
2) In browser.js, reverse the order of text/x-moz-url and text/unicode in the flavourSet for the urlbar.  Blake's comment here disturbs me, but in my brief testing (dragging random things from 2.0 and trunk to trunk), I didn't see any circumstances where we actually do this.  In fact using my DNDebug app, I don't see that we put the URL in the data flavors at all when dragging plain text.

Blake's comment:
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/browser/base/content/browser.js&mark=2272-2275#2272
Comment on attachment 286026 [details] [diff] [review]
fix some stuff

Looking for r=neil on the widget portion.  Maybe even r+sr if I'm lucky!
Attachment #286026 - Flags: review?(neil)
Attachment #286026 - Flags: review?(neil) → review+
Comment on attachment 286026 [details] [diff] [review]
fix some stuff

Looking for review on the browser portion.
Attachment #286026 - Flags: review?(gavin.sharp)
Attachment #286026 - Flags: review?(gavin.sharp) → review+
Comment on attachment 286026 [details] [diff] [review]
fix some stuff

Neil said this was intended to be r+sr=neil.

Looking for approval to fix this bug.  Will bite people dragging URLs from branch products (including Thunderbird 200x and other XULRunner apps).  Would be nice to get it in for beta testers, also to verify that it doesn't regress anything.
Attachment #286026 - Flags: superreview+
Attachment #286026 - Flags: approvalM9?
Comment on attachment 286026 [details] [diff] [review]
fix some stuff

a=endgame drivers for after M9 freeze (should test for regressions in nightlies before betas, we thinks!)
Attachment #286026 - Flags: approvalM9?
Attachment #286026 - Flags: approvalM9-
Attachment #286026 - Flags: approval1.9+
Target Milestone: Firefox 3 M10 → Firefox 3 M11
FWIW, I'm just waiting for a clear spot to land this.  I don't see any reason it shouldn't get into M10.
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: Firefox 3 M11 → Firefox 3 M10
Depends on: 403428
Verified fix on Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b2) Gecko/2007121014 Firefox/3.0b2.  and on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 

Dragging links to URL from 2.0.0.11 to Fx3 beta 2 does not include title.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: