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

File selector incorrectly thinks no file was selected #5509

Open
ullallulloo opened this issue Mar 28, 2024 · 1 comment
Open

File selector incorrectly thinks no file was selected #5509

ullallulloo opened this issue Mar 28, 2024 · 1 comment

Comments

@ullallulloo
Copy link

ullallulloo commented Mar 28, 2024

What's the problem?

When I try to restore a backup from a file, it checks if a file has been selected on mouse move or focus to know when the dialog is closed.

Promise.all([waitForEvent(window, 'mousemove'), waitForEvent(window, 'focus')]).then(() => requestIdleCallback(() => {

The problem is that it takes a second or two to open the file selector dialog and some milliseconds to fire the onchange listener where focus has returned to the main window. If one moves his mouse at all after clicking the "File" button or after selecting the file, it will check too soon and say "No file selected." It looks like a bug in requestIdleCallback() to me, which a setTimeout() or two may need to be added to work around.

Are there any related posts in https://github.com/honestbleeps/Reddit-Enhancement-Suite/issues or /r/RESissues?

I didn't see an issue here, but there are several for years on /r/RESissues.

@TheNightRider12
Copy link

I am having the same issue as well when I try to restore a file that I have previously backed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants