Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Oct 8, 2024
1 parent 7995105 commit 02ac942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/x-data-grid/src/utils/keyboardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export function isPasteShortcut(event: React.KeyboardEvent) {
// for example, it would be another letter on a Dvorak physical keyboard.
// We can't use event.key === 'v' as event.key is not stable with key modifiers and keyboard layouts,
// for example, it would be ה on a Hebrew keyboard layout.
// https://github.com/w3c/uievents/issues/377 could be a long-term solution
String.fromCharCode(event.keyCode) === 'V' &&
!event.shiftKey &&
!event.altKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const useField = <
switch (true) {
// Select all
case (event.ctrlKey || event.metaKey) &&
event.key.toLowerCase() === 'a' &&
String.fromCharCode(event.keyCode) === 'A' &&
!event.shiftKey &&
!event.altKey: {
// prevent default to make sure that the next line "select all" while updating
Expand Down

0 comments on commit 02ac942

Please sign in to comment.