Skip to content

Commit

Permalink
fix(core): set isPressed to true on blur and contextmenu even…
Browse files Browse the repository at this point in the history
…ts 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]>
  • Loading branch information
bcakmakoglu authored Nov 1, 2024
1 parent a48659a commit e51f08c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lovely-hairs-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vue-flow/core": patch
---

Set `isPressed` to `true` if permanent keypress is enabled
2 changes: 1 addition & 1 deletion packages/core/src/composables/useKeyPress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function useKeyPress(keyFilter: MaybeRefOrGetter<KeyFilter | boolean | nu

pressedKeys.clear()

isPressed.value = false
isPressed.value = toValue(keyFilter) === true
}

function createKeyFilterFn(keyFilter: KeyFilter | boolean | null) {
Expand Down

0 comments on commit e51f08c

Please sign in to comment.