-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Fix multiple save-as prompts #541
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
Conversation
How is a dialog displayed twice? This feels like more of a patch and less of a fix.
@kylecarbs If the prompt is already open and the user presses the keybind again, it opens a second prompt
(削除) One solution that might work (this is untested) is something like: (削除ここまで)
overlayDiv.addEventListener("keydown", (event) => {
event.preventDefault();
});
(削除) Could also bind escape
in there while we're at it to close the dialog. (削除ここまで)
(削除) But this might prevent typing from working in the "save as" dialog. Maybe in that case we can preventDefault
on the input instead. But there might be a more clever way to keep the keypresses from escaping the overlay div while still working inside it. (削除ここまで)
We discovered this does not work. The event must propagate all the way up for the input to work. 🤷♂️ We'd have to create a custom input or something to go this route.
Uh oh!
There was an error while loading. Please reload this page.
Describe in detail the problem you had and how this PR fixes it
The save as overlays open on top of each other if invoked before dismissing. This checks to see if there is an overlay present before spawning another one.
Is there an open issue you can link to?
fixes #536