Skip to content

Commit e51f08c

Browse files
authored
fix(core): set isPressed to true on blur and contextmenu events if permant keypress is enabled (#1667)
* fix(core): set isPressed to `true` on reset if permanent keypress is enabled Signed-off-by: braks <[email protected]> * chore(changeset): add Signed-off-by: braks <[email protected]> --------- Signed-off-by: braks <[email protected]>
1 parent a48659a commit e51f08c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/lovely-hairs-push.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Set `isPressed` to `true` if permanent keypress is enabled

packages/core/src/composables/useKeyPress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export function useKeyPress(keyFilter: MaybeRefOrGetter<KeyFilter | boolean | nu
146146

147147
pressedKeys.clear()
148148

149-
isPressed.value = false
149+
isPressed.value = toValue(keyFilter) === true
150150
}
151151

152152
function createKeyFilterFn(keyFilter: KeyFilter | boolean | null) {

0 commit comments

Comments
 (0)