do not preventDefault for ctrl-r

This commit is contained in:
Dmitry Vasilev
2024-02-05 07:42:36 +08:00
parent 86eb3c0ffc
commit 9a1d7003c0

View File

@@ -13,9 +13,6 @@ export class CallTree {
this.container.addEventListener('keydown', (e) => { this.container.addEventListener('keydown', (e) => {
// Do not scroll
e.preventDefault()
if(e.key == 'Escape') { if(e.key == 'Escape') {
this.ui.editor.focus() this.ui.editor.focus()
} }
@@ -41,18 +38,26 @@ export class CallTree {
} }
if(e.key == 'ArrowDown' || e.key == 'j'){ if(e.key == 'ArrowDown' || e.key == 'j'){
// Do not scroll
e.preventDefault()
exec('calltree.arrow_down') exec('calltree.arrow_down')
} }
if(e.key == 'ArrowUp' || e.key == 'k'){ if(e.key == 'ArrowUp' || e.key == 'k'){
// Do not scroll
e.preventDefault()
exec('calltree.arrow_up') exec('calltree.arrow_up')
} }
if(e.key == 'ArrowLeft' || e.key == 'h'){ if(e.key == 'ArrowLeft' || e.key == 'h'){
// Do not scroll
e.preventDefault()
exec('calltree.arrow_left') exec('calltree.arrow_left')
} }
if(e.key == 'ArrowRight' || e.key == 'l'){ if(e.key == 'ArrowRight' || e.key == 'l'){
// Do not scroll
e.preventDefault()
exec('calltree.arrow_right') exec('calltree.arrow_right')
} }
}) })