mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
use CMD/meta key for opening link in a new tab on mac, #3303
This commit is contained in:
parent
c6e766f5c6
commit
1b242a905b
@ -97,8 +97,10 @@ function goToLink(e) {
|
||||
|
||||
const notePath = getNotePathFromLink($link);
|
||||
|
||||
const ctrlKey = (!utils.isMac() && e.ctrlKey) || (utils.isMac() && e.metaKey);
|
||||
|
||||
if (notePath) {
|
||||
if ((e.which === 1 && e.ctrlKey) || e.which === 2) {
|
||||
if ((e.which === 1 && ctrlKey) || e.which === 2) {
|
||||
appContext.tabManager.openTabWithNoteWithHoisting(notePath);
|
||||
}
|
||||
else if (e.which === 1) {
|
||||
@ -116,7 +118,7 @@ function goToLink(e) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((e.which === 1 && e.ctrlKey) || e.which === 2
|
||||
if ((e.which === 1 && ctrlKey) || e.which === 2
|
||||
|| $link.hasClass("ck-link-actions__preview") // within edit link dialog single click suffices
|
||||
|| $link.closest("[contenteditable]").length === 0 // outside of CKEditor single click suffices
|
||||
) {
|
||||
|
@ -343,7 +343,7 @@ export default class NoteTreeWidget extends NoteContextAwareWidget {
|
||||
|
||||
node.setFocus(true);
|
||||
}
|
||||
else if (event.ctrlKey) {
|
||||
else if ((!utils.isMac() && event.ctrlKey) || (utils.isMac() && event.metaKey)) {
|
||||
const notePath = treeService.getNotePath(node);
|
||||
appContext.tabManager.openTabWithNoteWithHoisting(notePath);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user