From 836edf7a4532bf50cc8754613f1ec8eb0810625c Mon Sep 17 00:00:00 2001 From: Shaharyar Shamshi Date: Wed, 7 Feb 2024 10:31:23 +0530 Subject: [PATCH] data grid fix the clipboard pasting when capslock is on --- .../src/hooks/features/clipboard/useGridClipboardImport.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/grid/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts b/packages/grid/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts index 13ae41beab18..6506078b20ad 100644 --- a/packages/grid/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts +++ b/packages/grid/x-data-grid-premium/src/hooks/features/clipboard/useGridClipboardImport.ts @@ -306,9 +306,7 @@ function defaultPasteResolver({ const isPasteShortcut = (event: React.KeyboardEvent) => { if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'v') { - if (event.shiftKey) { - return false; - } else if (event.altKey) { + if (event.shiftKey || event.altKey) { return false; } return true;