Skip to content

Commit 7bd3764

Browse files
committed
fix: preventDefault and stopPropagation on keyDown
1 parent 7925f78 commit 7bd3764

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/odyc/src/inputs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ class InputsHandler {
136136
([_, keys]) => keys === e.code || keys.includes(e.code),
137137
)
138138
if (!entrie) return
139+
e.preventDefault()
140+
e.stopPropagation()
139141
const [input] = entrie
140142
const now = e.timeStamp
141143
const last = this.lastKeysEvents.get(e.code)

0 commit comments

Comments
 (0)