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

Paste keyboard shortcuts do not work on Safari on Mac OS #489

Open
abbasgalen opened this issue Jan 12, 2023 · 1 comment
Open

Paste keyboard shortcuts do not work on Safari on Mac OS #489

abbasgalen opened this issue Jan 12, 2023 · 1 comment

Comments

@abbasgalen
Copy link

Using paste keyboard shortcut does not work when using Safari on Mac OS.

The issue is due to the checks in onInputKeyPress(event: KeyboardEvent). This function allows characters such as c and v along with Ctrl key. However on Mac when using the command key the key.ctrlKey is false and so the check fails. the key.metaKey is true but is not used here. This issue does not exist in Chrome or Firefox on MacOs because pasting does not invoke the keypress event on those browser but it does on Safari.

The ideal fix would be to allow the Command key along with the Ctrl Key. essentially changing the check from
!(event.ctrlKey && allowedCtrlChars.test(event.key))
to
!((event.ctrlKey || event.metaKey) && allowedCtrlChars.test(event.key))

@PT-WP
Copy link

PT-WP commented Dec 22, 2023

I've got the same problem, when this will get fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants