fix(deletion): do not delete node when user is inside input closes #3895
This commit is contained in:
@@ -92,6 +92,12 @@ export function useKeyPress(
|
||||
} else {
|
||||
pressedKeys.current.delete(event[keyOrCode]);
|
||||
}
|
||||
|
||||
// fix for Mac: when cmd key is pressed, keyup is not triggered for any other key, see: https://stackoverflow.com/questions/27380018/when-cmd-key-is-kept-pressed-keyup-is-not-triggered-for-any-other-key
|
||||
if (event.key === 'Meta') {
|
||||
pressedKeys.current.clear();
|
||||
}
|
||||
|
||||
modifierPressed.current = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user