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

Consume keyboard event in flashcard modal #637

Merged
merged 1 commit into from
Mar 5, 2023
Merged

Consume keyboard event in flashcard modal #637

merged 1 commit into from
Mar 5, 2023

Conversation

polyipseity
Copy link
Contributor

@polyipseity polyipseity commented Feb 23, 2023

This prevents pressing <Space> from activating any focused button.

For example, if I press the skip button, the button will become focused and the next flashcard shows up. Then in the next flashcard, when I want to press <Space> to reveal the answer, the focused skip button is also activated because the keydown event is not consumed, leading to the flashcard being skipped instead of having its answer revealed like I intended.

This prevents pressing <Space> from activating any focused button.

Signed-off-by: William So <polyipseity@gmail.com>
@st3v3nmw st3v3nmw merged commit 274da1b into st3v3nmw:master Mar 5, 2023
@polyipseity polyipseity deleted the fix-flashcard-modal-keydown branch March 5, 2023 06:13
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

Successfully merging this pull request may close these issues.

2 participants