禁止默认的全选行为
parent
42109ce000
commit
f40f019d2e
|
@ -65,6 +65,9 @@ const handle_fullscreen = (event: LX.KeyDownEevent) => {
|
|||
isFullscreen.value = fullscreen
|
||||
})
|
||||
}
|
||||
const handle_selection = (event: LX.KeyDownEevent) => {
|
||||
event.event?.preventDefault()
|
||||
}
|
||||
|
||||
export default () => {
|
||||
watch(isFullscreen, val => {
|
||||
|
@ -126,6 +129,7 @@ export default () => {
|
|||
window.app_event.on('keyDown', handle_key_down)
|
||||
window.key_event.on('key_mod+f12_down', handle_open_devtools)
|
||||
window.key_event.on('key_f11_down', handle_fullscreen)
|
||||
window.key_event.on('key_mod+a_down', handle_selection)
|
||||
document.body.addEventListener('click', handleBodyClick, true)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
|
@ -136,6 +140,7 @@ export default () => {
|
|||
window.app_event.off('keyDown', handle_key_down)
|
||||
window.key_event.off('key_mod+f12_down', handle_open_devtools)
|
||||
window.key_event.off('key_f11_down', handle_fullscreen)
|
||||
window.key_event.off('key_mod+a_down', handle_selection)
|
||||
document.body.removeEventListener('click', handleBodyClick)
|
||||
rSetConfig()
|
||||
rFocus()
|
||||
|
|
Loading…
Reference in New Issue