Skip to content

Commit

Permalink
Removing the preventDefault instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard-Tby committed Jan 6, 2025
1 parent 95c4645 commit 56a509d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/selection/useSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,8 @@ export const useSelection = ({
!element.isContentEditable;

const isMeta = event.metaKey || event.ctrlKey;
const isSystemShortcut = ['c', 'x', 'v'].includes(event.key.toLowerCase());

if (isSafe && isMeta && !isSystemShortcut) {
event.preventDefault();
if (isSafe && isMeta) {
setMetaKeyDown(true);
}
}, []);
Expand Down

0 comments on commit 56a509d

Please sign in to comment.