fix(core): allow control key as pan activation key code (#1707)
* fix(core): allow control key as pan activation key code Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): allow drag regardless of btn chosen Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): prevent browser ctx menu on pane right click Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup useKeyPress handler Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * fix(core): check `panOnDrag` prop for allowed drag buttons Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(changeset): add Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { MaybeRefOrGetter } from 'vue'
|
||||
import { onMounted, ref, toRef, toValue, watch } from 'vue'
|
||||
import { ref, toRef, toValue, watch } from 'vue'
|
||||
import type { KeyFilter, KeyPredicate } from '@vueuse/core'
|
||||
import { onKeyStroke, useEventListener } from '@vueuse/core'
|
||||
|
||||
@@ -111,9 +111,7 @@ export function useKeyPress(keyFilter: MaybeRefOrGetter<KeyFilter | boolean | nu
|
||||
},
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
useEventListener(window, ['blur', 'contextmenu'], reset)
|
||||
})
|
||||
useEventListener(['blur', 'contextmenu'], reset)
|
||||
|
||||
onKeyStroke(
|
||||
(...args) => currentFilter(...args),
|
||||
|
||||
Reference in New Issue
Block a user