Skip to content

Commit

Permalink
open email in new window
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarlandian committed May 7, 2021
1 parent f7f7407 commit 5f23c91
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion spotlight-client/src/ShareModal/ShareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,16 @@ const ShareModal = (
<UrlText>{urlToShare}</UrlText>
<ShareButtons>
<Button onClick={() => copyUrl()}>Copy URL</Button>
<EmailShareButton url={urlToShare}>
<EmailShareButton
url={urlToShare}
// opens the link in a new tab or window;
// good for webmail users and consistent with other share links
// that also open a new window by default
openShareDialogOnClick
// prevents the mailto link from also opening a webmail client
// in the current window, which happens in some browsers
onClick={() => undefined}
>
<Button as="div">
<IconEmail />
</Button>
Expand Down

0 comments on commit 5f23c91

Please sign in to comment.