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

fix(client): nav control focus (Triggered with next page/animation at the same time) #40

Merged
merged 6 commits into from
May 9, 2021

Conversation

FyisFe
Copy link
Contributor

@FyisFe FyisFe commented May 9, 2021

Hi Anthony,

I noticed that you have fixed this issue. However, the same problem also occurs if my mouse does not leave the navigation bar.

I think your solution is already perfect, just provide another solution for you to check. 😄

Furthermore, I find that the total page number on the navigation bar is always 1 less than the actual one, and I fix it by adding 1. 😄

@FyisFe FyisFe changed the title fix: Prevent navigator buttons from being triggered by spacebar fix: Prevent navigator buttons from being triggered by spacebar, and fix total page number error May 9, 2021
@antfu
Copy link
Member

antfu commented May 9, 2021

Thanks for looking into, but actually we could have a better solution for that.

Just adding 'BUTTON' and 'A' to the list should work

export const isInputing = computed(() => ['INPUT', 'TEXTAREA'].includes(activeElement.value?.tagName || '') || activeElement.value?.classList.contains('CodeMirror-code'))

@FyisFe FyisFe changed the title fix: Prevent navigator buttons from being triggered by spacebar, and fix total page number error fix: nav control focus (Triggered with next page/animation at the same time) May 9, 2021
@FyisFe
Copy link
Contributor Author

FyisFe commented May 9, 2021

Have done that. Thanks so much for your reply.

@antfu antfu changed the title fix: nav control focus (Triggered with next page/animation at the same time) fix(client): nav control focus (Triggered with next page/animation at the same time) May 9, 2021
@antfu antfu merged commit 417fb25 into slidevjs:main May 9, 2021
antfu pushed a commit that referenced this pull request Mar 7, 2024
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.

None yet

2 participants