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

Copy/Paste/Refresh keyboard shortcuts not working if using useSelection Hook #272

Open
jon-coffey opened this issue Aug 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jon-coffey
Copy link

jon-coffey commented Aug 30, 2024

Describe the bug

I use the reagraph component in my application. It's just a part of a whole. When the useSelection Hook is used then all "global" keyboard shortcuts like copy/paste/refresh are disabled on the whole page (except if the cursor is focus-within in a texfield).

It might be the reakeys library that cuts the global hotkeys out (assumption) but I'm not able to add e.g. meta+c or ctrl+c or cmd+c as a workaround shortcut. Observations: others like shift+a work fine.

Steps to Reproduce the Bug or Issue

I forked the example on code sandbox where the behavior is visible. https://codesandbox.io/p/sandbox/reagraph-example-forked-ncjgm9?workspaceId=b7d61418-67c4-480f-8dd4-a7eb5e314ed1
If you comment out the useSelection (line 49-53), copy and paste is working again.

Expected behavior

I wish have the ability to disable the hotkey inteference from reakeys completly or that it at least that it doesn't disable defaults like copy, paste and refresh.

Platform

  • Reagraph Version: 4.19.2
  • OS: macOS
  • Browser: Chrome

Your Example Website or App

https://codesandbox.io/p/sandbox/reagraph-example-forked-ncjgm9?workspaceId=b7d61418-67c4-480f-8dd4-a7eb5e314ed1

@amcdnl amcdnl added the bug Something isn't working label Aug 30, 2024
@Edouard-Tby
Copy link

Same issue here. I'm interested in a fix or workaround if any. Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants