fix: prevent nodes from being unintentionally deleted by pressing the backspace key. (#21023)

This commit is contained in:
kurokobo 2025-06-17 17:11:30 +09:00 • committed by GitHub
commit df6451076b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View file

@ -61,7 +61,7 @@ export const useShortcuts = (): void => {
return !showFeaturesPanel && !isEventTargetInputArea(e.target as HTMLElement)
}, [workflowStore])
useKeyPress(['delete', 'backspace'], (e) => {
useKeyPress(['delete'], (e) => {
if (shouldHandleShortcut(e)) {
e.preventDefault()
handleNodesDelete()