Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
nol166 wants to merge 3 commits into master from fix/save-as
Closed

Fix multiple save-as prompts #541

nol166 wants to merge 3 commits into master from fix/save-as

Conversation

Copy link
Contributor

@nol166 nol166 commented Apr 18, 2019
edited
Loading

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

Copy link
Member

How is a dialog displayed twice? This feels like more of a patch and less of a fix.

Copy link
Contributor Author

nol166 commented Apr 24, 2019

@kylecarbs If the prompt is already open and the user presses the keybind again, it opens a second prompt

Copy link
Member

code-asher commented Apr 25, 2019
edited
Loading

(削除) 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.

nol166 reacted with thumbs up emoji

@code-asher code-asher deleted the fix/save-as branch July 2, 2019 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@code-asher code-asher Awaiting requested review from code-asher

@kylecarbs kylecarbs Awaiting requested review from kylecarbs

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Save shortcut triggers even when save dialog is open

AltStyle によって変換されたページ (->オリジナル) /