Prevent default on backspace when not in a text field (#1367)

This commit is contained in:
Frank Noirot
2024-02-15 14:25:26 -05:00
committed by GitHub
parent 602e7afef6
commit 2730b6d152
2 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,9 @@ export function App() {
useHotkeys('shift + e', () => togglePane('kclErrors'))
useHotkeys('shift + d', () => togglePane('debug'))
useHotkeys('esc', () => send('Cancel'))
useHotkeys('backspace', (e) => {
e.preventDefault()
})
useHotkeys(
isTauri() ? 'mod + ,' : 'shift + mod + ,',
() => navigate(filePath + paths.SETTINGS),