Open Bug 974551 Opened 10 years ago Updated 2 years ago

Dragging/Dropping a URL into Lightning uses wrong URL/URI

Categories

(Calendar :: General, defect)

x86
Windows
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: ymc, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636

Steps to reproduce:

From a webpage in any web-browser (incl FireFox) when you drag a link to a valid .ics file, Thunderbird/Lightning will use a broken URL to retrieve the linked file,

the title of the link is actually appended (without any whitespace) to the URL, either creating a totally wrong url (in case of static files mostly) or a broken parameter

can be verified with the access log of the http server serving the linked document/file,

the link  dropped is handled as a text/x-moz-url data type, where the link name is passed as a 2nd line in the transfer data according to https://developer.mozilla.org/en-US/docs/DragDrop/Recommended_Drag_Types#link



Actual results:

in many cases the result is, that the drop operation is not accepted because of an HTTP error (e.g. 404)



Expected results:

the link title should not be appended to the url
Component: Untriaged → Lightning Only
Product: Thunderbird → Calendar
Version: 24 → unspecified
found it:
calendar-dnd-listener.js: line 283ff.
```
 case "text/x-moz-url":            		    
    var uri = Services.io.newURI(data.toString(), null, null);
```

should make use of the
getData("URL") option to only get the URL and no formatting/comment data


e.g. 
```
 case "text/x-moz-url":            		    
    data = aEvent.dataTransfer.getData("URL");
    var uri = Services.io.newURI(data.toString(), null, null);
```
OS: Windows 7 → Windows
Hardware: x86_64 → x86
Severity: normal → trivial
Component: Lightning Only → General
Severity: trivial → S4
You need to log in before you can comment on or make changes to this bug.