Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Copy & Paste on Cells using localize keyboard #14219

Closed
rotembarsela opened this issue Aug 15, 2024 · 4 comments · Fixed by #14220
Closed

[data grid] Copy & Paste on Cells using localize keyboard #14219

rotembarsela opened this issue Aug 15, 2024 · 4 comments · Fixed by #14220
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Clipboard Related to clipboard copy or paste functionalities l10n localization regression A bug, but worse

Comments

@rotembarsela
Copy link
Contributor

rotembarsela commented Aug 15, 2024

Steps to reproduce

Link to live example: (required)
https://mui.com/x/react-data-grid/clipboard/

Steps:

  1. Copy&Paste working using only English localization Keyboard
  2. Using Hebrew for example will not work, because the function is looking for the "v" key, instead of the KeyC
  3. inside packages\x-data-grid-premium\src\hooks\features\clipboard,
    handleCopy func:
    https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/hooks/features/clipboard/useGridClipboard.ts
  4. same thing for the paste shortcut,
    image

Current behavior

English language localization - Copy&Paste work
Changing to other Language (Computer) - Copy&Paste fail

Expected behavior

Copy&Paste work on all localizations

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: copy paste copy&paste keyboard cell cells x-data-grid-premium

@rotembarsela rotembarsela added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 15, 2024
@github-actions github-actions bot added the component: data grid This is the name of the generic UI component, not the React module! label Aug 15, 2024
@michelengelen michelengelen changed the title [DataGrid] Copy & Paste on Cells using localize keyboard [data grid] Copy & Paste on Cells using localize keyboard Aug 15, 2024
@michelengelen michelengelen added l10n localization feature: Clipboard Related to clipboard copy or paste functionalities labels Aug 15, 2024
@michelengelen
Copy link
Member

Thanks for raising this and your PR.
We appreciate it when the community is actionable! 🙇🏼

I left comments on the PR, but will leave it to the team to approve! 👍🏼

@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 15, 2024
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 16, 2024

What OS are you using? What are the properties values of event when you press the copy shortcut?

@rotembarsela
Copy link
Contributor Author

rotembarsela commented Aug 17, 2024

What OS are you using? What are the properties values of event when you press the copy shortcut?

Checks has been done on the code before changes:
image

Tested that on Windows 11 and 10,
Keyboard layout: ENG/עבר,
Screenshot: (First is CTRL+C on ENG layout, second CTRL+C on HEB layout),
you can see that on the second attempt it is false instead of true, because it check the C key value, which is 'ב' on HEB layout
image

Example of an HEB Layout keyboard:
image

Copy link

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@rotembarsela How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Clipboard Related to clipboard copy or paste functionalities l10n localization regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants