-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Closed as not planned
Copy link
Labels
Status: Needs ReproducerIssue needs a runnable reproducerIssue needs a runnable reproducer
Description
FileUpload 'chooseOptions' triggers file dialog on double-click in icon type "string class name"
Component: FileUpload
Current Behavior:
The file selection dialog/window only opens consistently after a double-click on the "Choose" button when the chooseOptions attribute is used (specifically when an icon is the primary or sole visual element of the button in basic/advenced mode).
CodeSandbox Link (Recommended): check the example of template in the primereact documentation
https://primereact.org/fileupload/#template
Additional Information:
- This behavior seems to be specific to the
FileUploadcomponent whenchooseOptionsis utilized icon as a string.
Reproducer
https://primereact.org/fileupload/#template
System Information
PrimeReact Version:10.9.4
React Version: 18.3.1
Browser: Chrome
Operating System: macOSSteps to reproduce the behavior
Reproduction Steps:
- Use the
<FileUpload>component inmode="basic"/mode="advanced". - Configure the
chooseOptionsattribute with at least theiconproperty (e.g.,chooseOptions={{ icon: 'pi pi-fw pi-plus' }}). Other properties withinchooseOptionsmight also trigger this. - In a browser environment, single-click the "Choose" button (which will only display the icon in this configuration).
- Observe that the file selection dialog/window does not appear.
- Double-click the same "Choose" button.
- Observe that the file selection dialog/window does appear.
Expected behavior
Expected Behavior:
The file selection dialog/window should open on a single-click of the "Choose" button, regardless of the configuration of the chooseOptions attribute, as this is the standard behavior for file input triggers.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Status: Needs ReproducerIssue needs a runnable reproducerIssue needs a runnable reproducer