Skip to content

Commit

Permalink
Match OS detection to ProseMirror approach
Browse files Browse the repository at this point in the history
  • Loading branch information
dancormier committed May 24, 2022
1 parent 85c5392 commit 59b59a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rich-text/plugins/link-mod-click-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export const linkModClickHandler = () =>
) {
const selectedLink = findLinkAtCursor(view.state);
const modPressed = event.getModifierState(
/Mac/.test(navigator.userAgent) ? "Meta" : "Control"
/Mac|iP(hone|[oa]d)/.test(navigator.platform)
? "Meta"
: "Control"
);

if (selectedLink && modPressed) {
Expand Down

0 comments on commit 59b59a2

Please sign in to comment.