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

Right after clicking navigator buttons, they will be triggerd by spacebar #36

Closed
FyisFe opened this issue May 8, 2021 · 1 comment
Closed

Comments

@FyisFe
Copy link
Contributor

FyisFe commented May 8, 2021

Problem:

Clicking any buttons in the navigation bar, then press the spacebar. It will trigger the "next animation" event and the event associated with the button together.

For example, I change to the dark mode at first:

Then I press the spacebar:

Reason:

I believe it is because the button gets focused after clicked, then pressing the spacebar can trigger the button. If I click somewhere to make it lose focus, the problem will not happen.

Solution:

I am not sure if it is a problem that needs to be solved, but I think it may ruin the user experience since they have to click somewhere else after clicking the navigator buttons.

I have solved it by blur(). If you think it is worthwhile to do so, I can submit a PR later.

Finally, thanks for this awesome project again! 👍

@antfu
Copy link
Member

antfu commented May 8, 2021

Yeah, nice catch. I am not sure how to handle this properly. Maybe let's see your approach in PR. Should be fixed in v0.6.2. Thanks!

@antfu antfu closed this as completed in cc11f87 May 8, 2021
antfu added a commit that referenced this issue Mar 7, 2024
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
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