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

Make it possible to call triggerEvent(fileInput, 'change', { files }) twice with the same files #923

Merged
merged 5 commits into from
Oct 26, 2020

Conversation

sdahlbac
Copy link
Contributor

@sdahlbac sdahlbac commented Oct 7, 2020

Fixes #921

Not really sure what I did wrong the previous time, now it seems to work fine.

Also moved the testcase to a better location as suggested.

@rwjblue
Copy link
Member

rwjblue commented Oct 19, 2020

I think if you have the time that you can update the defineProperty that we do to add configurable that would do the trick.

Mind giving that a shot?

@sdahlbac
Copy link
Contributor Author

I thought that was what I tried with the results in the PR comment, but I can give it another go

@rwjblue
Copy link
Member

rwjblue commented Oct 19, 2020

Oh, I see! I'm sorry, I missed that those failures were with that change.

@nag5000
Copy link
Contributor

nag5000 commented Oct 20, 2020

I also tried to apply the suggested fix, but ended up with different test failures, unsure how to fix.

@sdahlbac Just use the element variable instead of local fileInput.

Also, it seems /tests/unit/dom/select-files-test.js is a better place for the new testcase.

@sdahlbac sdahlbac changed the title Add a failing testcase for #921 Make it possible to call triggerEvent(fileInput, 'change', { files })` twice with the same files Oct 21, 2020
…into 921-fix-trigger-event

# Conflicts:
#	tests/unit/dom/select-files-test.js
@sdahlbac sdahlbac changed the title Make it possible to call triggerEvent(fileInput, 'change', { files })` twice with the same files Make it possible to call triggerEvent(fileInput, 'change', { files }) twice with the same files Oct 21, 2020
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you!!

@rwjblue rwjblue merged commit 059a584 into emberjs:master Oct 26, 2020
@rwjblue rwjblue added the bug label Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

triggerEvent(fileInput, 'change', { files }) cannot be called twice with the same files
3 participants