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

@ -48,6 +48,7 @@ function CommandComboBox({
(event.metaKey && event.key === 'k') ||
(event.key === 'Backspace' && !event.currentTarget.value)
) {
event.preventDefault()
commandBarSend({ type: 'Close' })
}
}}