You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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))
The text was updated successfully, but these errors were encountered:
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 asc
andv
along withCtrl
key. However on Mac when using the command key thekey.ctrlKey
is false and so the check fails. thekey.metaKey
is true but is not used here. This issue does not exist in Chrome or Firefox on MacOs because pasting does not invoke thekeypress
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))
The text was updated successfully, but these errors were encountered: