Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUpload: Input Triggered on Any Mouse Click #13722

Closed
balajis-qb opened this issue Sep 24, 2023 · 1 comment · Fixed by #13723
Closed

FileUpload: Input Triggered on Any Mouse Click #13722

balajis-qb opened this issue Sep 24, 2023 · 1 comment · Fixed by #13723
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@balajis-qb
Copy link

balajis-qb commented Sep 24, 2023

Issue Report: FileUpload Input Triggered on Any Mouse Click

Description

The FileUpload component's input is being triggered on any mouse click event, not just the left click. This behavior is unexpected and may lead to unintended file selections.

Steps to Reproduce

Go to https://primeng.org/fileupload right click on the first FileUpload (mode="basic") -> see it opens the file browser and closes the context menu directly

Expected Behavior

The expected behavior is that the FileUpload component's input should only be triggered on a left mouse click (e.g., a regular file selection behavior).

Actual Behavior

Only the context menu should open

Environment Information

  • PrimeNg Version: 16.3.1
  • Browser and Version: Google Chrome 117.0.5938.92 & Brave 1.58.131
  • Operating System: Windows 10 & 11

Code Snippet

<div class="card flex justify-content-center">
    <p-toast></p-toast>
    <p-fileUpload mode="basic" chooseLabel="Choose" name="demo[]" url="https://www.primefaces.org/cdn/api/upload.php" accept="image/*" maxFileSize="1000000" (onUpload)="onUpload($event)"></p-fileUpload>
</div>
@balajis-qb balajis-qb added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 24, 2023
balajis-qb pushed a commit to balajis-qb/primeng that referenced this issue Sep 24, 2023
balajis-qb pushed a commit to qburst/primeng that referenced this issue Sep 24, 2023
@balajis-qb
Copy link
Author

balajis-qb commented Sep 24, 2023

I've resolved the issue in my PR #13723. Kindly review and let me know if any changes required.

@balajis-qb balajis-qb reopened this Sep 24, 2023
@cetincakiroglu cetincakiroglu added this to the 16.8.0 milestone Nov 8, 2023
cetincakiroglu added a commit that referenced this issue Nov 8, 2023
…ck-trigger

Fix #13722: FileUpload click instead of mouseup
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working LTS-PORTABLE Issue's fix will be ported to supported LTS versions and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Issue's fix will be ported to supported LTS versions Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
2 participants