Closed Bug 1612403 Opened 4 years ago Closed 4 years ago

File extensions are duplicated for file inputs with custom 'accept'

Categories

(Firefox :: File Handling, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 75
Iteration:
74.2 - Jan 20 - Feb 09
Tracking Status
firefox-esr68 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- wontfix
firefox75 --- fixed

People

(Reporter: gserg.g, Assigned: mak)

Details

Attachments

(2 files)

Attached image file types.png

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

Firefox 72 on Windows 7 and Windows 10.

Given a file input element with a custom 'accept' attribute:

<input type="file" name="file" accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/plain" multiple="multiple">

Actual results:

When clicked, a file dialog is displayed where the file extensions are duplicated in both the "All supported types" item and in the individual file type items (see screenshot):

All Supported Types (.pdf;.pdf;.doc;.doc;.docx;.docx;.xls;.xls;.xlsx;.xlsx;.txt.txt)
Adobe Acrobat Document (.pdf;.pdf)
Microsoft Word 97 - 2003 Document (.doc;.doc)
Microsoft Word Document (.docx;.docx)
Microsoft Excel 97-2003 Worksheet (.xls;.xls)
Microsoft Excel Worksheet (.xlsx;.xlsx)
Text Document (.txt;.txt)

Expected results:

File extensions in the file types list are not duplicated:

All Supported Types (.pdf; .doc; .docx; .xls; .xlsx; .txt)
Adobe Acrobat Document (
.pdf)
Microsoft Word 97 - 2003 Document (
.doc)
Microsoft Word Document (
.docx)
Microsoft Excel 97-2003 Worksheet (
.xls)
Microsoft Excel Worksheet (
.xlsx)
Text Document (
.txt)

Hi,

I was able to reproduce this issue on Windows 10 for Firefox version Nightly 74.0a1 (2020-02-03) (64-bit) - Beta 73.0b11 (64-bit) - Release 72.0.2 (64-bit). Marking those flags as affected.

Also I'm setting the component to Firefox - File Handling and status to new for someone to take a look at this.

Status: UNCONFIRMED → NEW
Component: Untriaged → File Handling
Ever confirmed: true
Version: 72 Branch → Trunk
Assignee: nobody → mak
Status: NEW → ASSIGNED
Iteration: --- → 74.2 - Jan 20 - Feb 09
Priority: -- → P2
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/8eb23bb2215a
File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/0a121aa7d527
File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/3cfea5c3c067
File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Backout by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f769fd5cefcb
Backed out changeset 3cfea5c3c067 for failing test_bug449141.html on a CLOSED TREE
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/065f8b63d920
File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Flags: needinfo?(mak)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: