Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Commit

Permalink
<Link /> to respect Meta key (#139)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Engel <[email protected]>
  • Loading branch information
philip-peterson and Paratron authored Dec 1, 2020
1 parent 4ac77da commit e0ceb4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Link.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {navigate, getBasepath} from "./router";
*/
export const setLinkProps = (props) => {
const onClick = (e) => {
if (!e.shiftKey && !e.ctrlKey && !e.altKey && props.target !== "_blank")) {
if (!e.shiftKey && !e.ctrlKey && !e.altKey && !e.metaKey && props.target !== "_blank")) {
e.preventDefault(); // prevent the link from actually navigating
navigate(e.currentTarget.href);
}
Expand Down

0 comments on commit e0ceb4a

Please sign in to comment.