mirror of https://github.com/logseq/logseq
fix: some keybindings not working issue
parent
1d39fe5a54
commit
e0b8e66906
|
@ -420,8 +420,9 @@ export abstract class TLState<
|
|||
// @ts-ignore
|
||||
const shortcut = this.constructor['shortcut'] as string
|
||||
if (shortcut) {
|
||||
KeyUtils.registerShortcut(shortcut, () => {
|
||||
KeyUtils.registerShortcut(shortcut, e => {
|
||||
this.parent.transition(this.id)
|
||||
e.stopPropagation()
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export class KeyUtils {
|
|||
}
|
||||
callback(keyboardEvent, combo)
|
||||
}
|
||||
Mousetrap.bind(keys, fn)
|
||||
Mousetrap.bind(keys, fn, 'keydown')
|
||||
return () => Mousetrap.unbind(keys)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue