Merge pull request #395 from lujakob/fix/open-note-in-new-tab

feat(note): open note in new tab on cmd press
This commit is contained in:
Kieran 2023-03-07 12:29:41 +00:00 committed by GitHub
commit 4dc26a08af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -175,7 +175,12 @@ export default function Note(props: NoteProps) {
function goToEvent(e: React.MouseEvent, id: u256) {
e.stopPropagation();
navigate(eventLink(id));
// detect cmd key and open in new tab
if (e.metaKey) {
window.open(eventLink(id), "_blank");
} else {
navigate(eventLink(id));
}
}
function replyTag() {