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 remove method throwing error on Firefox #3119

Closed
bnymncoskuner opened this issue Jun 16, 2017 · 0 comments
Closed

FileUpload remove method throwing error on Firefox #3119

bnymncoskuner opened this issue Jun 16, 2017 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@bnymncoskuner
Copy link

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior

On FileUpload component, when user selects a file, it is listed within the component with a remove button which calls remove method.

this.onRemove.emit({originalEvent: event, file: this.files[index]});

On the line above, event is undefined when the method is invoked. Therefore, Firefox throws an error.
I implemented my own remove button and I call this method with index as well. It gives me the same error.

Expected behavior

It should not throw an error on undefined event, or event should be passed to the function somehow.

Minimal reproduction of the problem with instructions

You can reproduce this bug on primeng demo page. Choose a file and try to use remove button (next to the selected file)
https://www.primefaces.org/primeng/#/fileupload

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • Angular version: 2.0.X
  • PrimeNG version: 2.0.X
  • Browser: [all | Chrome XX | Firefox 53 | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

@cagataycivici cagataycivici self-assigned this Jun 23, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jun 23, 2017
@cagataycivici cagataycivici added this to the 4.1.0 milestone Jun 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants