Dragging the icon from the URL bar to a file manager window results in “Untitled.lnk” for text files
Categories
(Firefox :: Site Identity, defect, P3)
Tracking
()
People
(Reporter: bugzilla.mozilla.org-6h11, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0
Steps to reproduce:
- Display a text file (for example, https://www.mozilla.org/robots.txt)
- Drag icon from URL bar to file manager or desktop to create a .lnk file
Actual results:
File is named Untitled.lnk
Expected results:
File should have a better name, for example “robots.txt.lnk” or “mozilla.org robots.txt.lnk” when displaying https://www.mozilla.org/robots.txt. Plain text documents without a filename (for example, at “/” or “/foo/”) should also get a descriptive lnk filename (for example, “example.org.lnk” if the document is at “example.org/” and “foo.lnk” or “example.org foo.lnk” if it’s at “example.org/foo/”).
Comment 1•5 years ago
|
||
Considering the fact that linux systems appear to NOT create any kind of shortcut when dragging the lock icon from the address bar to the desktop and the fact that Mac OS systems create a shortcut with a different name, I will consider this issue Windows specific.
This being said, I have reproduced this behavior on all the main Firefox versions with Windows 10. The name of the shortcut is "Untitled.URL". I do not know what the intended shortcut name is, but I will set this bug's component as (Firefox) File Handling and hope it will be addressed or at least redirected to a better component.
Thank you!
Updated•5 years ago
|
Comment 2•5 years ago
|
||
I think it's handled here
https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/browser/base/content/browser-siteIdentity.js#1262
that makes it either Site Identity or Address Bar.
Based on https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/widget/windows/nsDataObj.cpp#1742 we look for a \n to distinguish url and title from text/x-moz-url flavor data.
x-moz-url here is properly set, but it just sets the title to gBrowser.contentTitle, that in this case is an empty string.
We should probably make this consistent with the urlbar code, that fallbacks to the url if contentTitle is empty.
https://searchfox.org/mozilla-central/rev/325c1a707819602feff736f129cb36055ba6d94f/browser/components/urlbar/UrlbarInput.jsm#1852
Updated•5 years ago
|
Updated•2 years ago
|
Description
•