Skip to content

Commit 417fb25

Browse files
authored
fix(client): nav control focus (Triggered with next page/animation at the same time) (#40)
1 parent 56361c1 commit 417fb25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/client/internals/MenuButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ onClickOutside(el, () => {
2222

2323
<template>
2424
<div ref="el" class="flex relative">
25-
<div :class="{ disabled }" @click="value = !value">
25+
<button :class="{ disabled }" @click="value = !value">
2626
<slot name="button" :class="{ disabled }" />
27-
</div>
27+
</button>
2828
<div
2929
v-show="value"
3030
class="rounded-md bg-main shadow absolute bottom-10 left-0 z-20"

packages/client/state/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const isScreenVertical = computed(() => windowSize.width.value <= windowS
1515
export const fullscreen = useFullscreen(isClient ? document.body : null)
1616

1717
export const activeElement = useActiveElement()
18-
export const isInputing = computed(() => ['INPUT', 'TEXTAREA'].includes(activeElement.value?.tagName || '') || activeElement.value?.classList.contains('CodeMirror-code'))
18+
export const isInputing = computed(() => ['INPUT', 'TEXTAREA', 'BUTTON', 'A'].includes(activeElement.value?.tagName || '') || activeElement.value?.classList.contains('CodeMirror-code'))
1919

2020
export const currentCamera = useStorage<string>('slidev-camera', 'default')
2121
export const currentMic = useStorage<string>('slidev-mic', 'default')

0 commit comments

Comments
 (0)