Describe the bug
The file picker in CEF defaults to a single file type, rather than all allowed file types. This is the opposite of the behaviour in Chrome.
Source
Imported from cefsharp/CefSharp#5113
To Reproduce
In Chrome Bootstrap (after upgrading CefSharp to 134.3.90), we're experiencing inconsistencies in how file type filters are displayed in file upload dialogs when using the accept attribute.
In Chrome, multiple file extensions in the accept attribute are combined into a single "Custom Files (.csv,.xlsx)" option, which is the desired behavior.
In CEF, the same accept attribute creates separate filter entries for each file type: "CSV File (.csv)" and "Microsoft Excel Worksheet (.xlsx)", plus an additional "Custom Files" entry.
We are using the Ant Design (antd) Upload component, which internally uses the standard HTML file input with an accept attribute to filter file types. In Chrome, when specifying multiple file types in the accept attribute, they are combined into a single "Custom Files" option in the file selection dialog. However, in CefSharp, the same attribute results in separate file type options being displayed, creating an inconsistent user experience.
The relevant code from our component:
<Upload
//
accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv"
//
>
<Button icon={<UploadOutlined />}>
//
</Button>
</Upload>
Expected behavior
One option in the file extension selection:
- Custom Files (.csv,.xlsx)
Actual behavior
Three options:
- CSV File (*.csv)
- Microsoft Excel Worksheet (*.xlsx)
- Custom Files (.csv,.xlsx)
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS: Windows 10
- CEF Version: 7499
Additional context
The expected behaviour reflects the behaviour in Chrome.
Describe the bug
The file picker in CEF defaults to a single file type, rather than all allowed file types. This is the opposite of the behaviour in Chrome.
Source
Imported from cefsharp/CefSharp#5113
To Reproduce
In
Chrome Bootstrap(after upgrading CefSharp to134.3.90), we're experiencing inconsistencies in how file type filters are displayed in file upload dialogs when using the accept attribute.In Chrome, multiple file extensions in the
acceptattribute are combined into a single "Custom Files (.csv,.xlsx)" option, which is the desired behavior.In CEF, the same
acceptattribute creates separate filter entries for each file type: "CSV File (.csv)" and "Microsoft Excel Worksheet (.xlsx)", plus an additional "Custom Files" entry.We are using the Ant Design (antd) Upload component, which internally uses the standard HTML file input with an
acceptattribute to filter file types. In Chrome, when specifying multiple file types in theacceptattribute, they are combined into a single "Custom Files" option in the file selection dialog. However, in CefSharp, the same attribute results in separate file type options being displayed, creating an inconsistent user experience.The relevant code from our component:
Expected behavior
One option in the file extension selection:
Actual behavior
Three options:
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
Additional context
The expected behaviour reflects the behaviour in Chrome.