-
Notifications
You must be signed in to change notification settings - Fork 12
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
Made some modifications #9
Comments
@kctang I'm unable to find a proper solution to this, as there is no API available to tell if a user cancels |
@alnorris correct. I was able to hack around that issue with the following:
NB: We are not using this component in our code, but were thinking about it. But this issue would be a blocker for us in consuming this. |
@icfantv Please make a PR! 🙏🏻 I will review and if it works I will definitely merge |
Hah. Ok. I'll try to take a look either tonight or tomorrow. |
@alnorris haven't forgotten about this. I'm trying to test out my change in our environment and the environment is having issues...which is higher priority... |
So the primary problem here is that a The So, so far as I've been able to prove, there's no way to solve this in a generic Promise-like fashion. |
So, it turns out I/we have to solve this problem. I'm going to take another crack at it, but know that the solution will basically be the Internet hack. I will attempt to get it working in this library, but it's going to be up to you, @alnorris, if you want to actually uptake it. |
Ok, I have a working solution for this, however, it requires/involves a hack. The "chosen" solution on the web to detect when cancel is clicked is to add a focus listener to I'm happy to paste the logic, but I'm not convinced it's the right way to go. PLMK what you'd like to do. |
Hi,
Thanks for this.
I made some changes for my TypeScript based application as the provided TS definitions was not good for me.
The only minor issue I have is the promise will never resolve or reject if user clicks cancel when the file input dialog is opened - potential memory leak if done repeatedly.
Sharing here FWIW:
The text was updated successfully, but these errors were encountered: