a download attribute: filename wrong displayed
Categories
(Firefox :: File Handling, defect)
Tracking
()
People
(Reporter: lukas.buchs, Unassigned)
Details
Attachments
(1 file)
|
11.58 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Steps to reproduce:
create a script who opens a csv file with the name "2023-02-22.csv" automatically:
check the example at https://jsfiddle.net/yf2wu7kv/1/
function getMyCSV() {
/* create csv file */
const blb = new File(["a,b,c\n1,2,3"], '2023-02-22.csv', { type: 'text/csv' });
/* open the download dialog */
const a = document.createElement("a");
a.style = "display: none";
a.href = URL.createObjectURL(blb);
a.download = '2023-02-22.csv';
document.body.appendChild(a);
a.click();
}
exec the function to open the download window (click the button in the jsfiddle).
Actual results:
the filename in the download window of Firefox is showed as "csv.2023-02-22" instead of "2023-02-22.csv". when saving the file, in the windows save dialog, its correct again.
the error happens only when the filename consists only of numbers. when you add characters to the name, it's correct.
Expected results:
the filename in the download window should be "2023-02-22.csv"
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Firefox::File Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 years ago
|
||
This seems duplication of Bug 1814696.
Comment 3•3 years ago
|
||
Hello! I have tried to reproduce the issue using firefox 112.0a1 (2023-03-02) on Windows 10, Ubuntu 22.04 and MacOS 12.6 but unfortunately I wasn't able to reproduce it on my end.
Could you please answer the following questions in order to further investigate this issue?
- Does this issue happen with a new profile? Here is a link on how to create one: https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles
- Does this issue happen in the latest nightly? Here is a link from where you can download it: https://www.mozilla.org/en-US/firefox/channel/desktop/
- Do you have any addons installed if so can you list them?
Comment 4•3 years ago
|
||
As Alice noted, this looks the same as bug 1814696. This should be fixed in the 110.0.1 release that went out earlier this week. Let us know if this is not the case.
| Reporter | ||
Comment 5•3 years ago
|
||
(In reply to :Gijs (he/him) from comment #4)
As Alice noted, this looks the same as bug 1814696. This should be fixed in the 110.0.1 release that went out earlier this week. Let us know if this is not the case.
*** This bug has been marked as a duplicate of bug 1814696 ***
True, it's fixed with release 110.0.1 . Thank you!
Description
•