Vanessa 2024-11-15 12:05:35 +08:00
parent 6437ec9793
commit 43c37ae925
2 changed files with 9 additions and 9 deletions

View file

@ -31,18 +31,18 @@ export const openLink = (protyle: IProtyle, aLink: string, event?: MouseEvent, c
) {
if (event && event.altKey) {
openAsset(protyle.app, linkAddress, pdfParams);
} else if (ctrlIsPressed) {
/// #if !BROWSER
openBy(linkAddress, "folder");
/// #else
openByMobile(linkAddress);
/// #endif
} else if (event && event.shiftKey) {
/// #if !BROWSER
openBy(linkAddress, "app");
/// #else
openByMobile(linkAddress);
/// #endif
} else if (ctrlIsPressed) {
/// #if !BROWSER
openBy(linkAddress, "folder");
/// #else
openByMobile(linkAddress);
/// #endif
} else {
openAsset(protyle.app, linkAddress, pdfParams, "right");
}

View file

@ -2177,7 +2177,7 @@ export class WYSIWYG {
if (backlinkBreadcrumbItemElement) {
const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id");
if (breadcrumbId) {
if (ctrlIsPressed) {
if (ctrlIsPressed && !event.shiftKey && !event.altKey) {
checkFold(breadcrumbId, (zoomIn) => {
openFileById({
app: protyle.app,
@ -2373,7 +2373,7 @@ export class WYSIWYG {
}
const tagElement = hasClosestByAttribute(event.target, "data-type", "tag");
if (tagElement && !event.altKey) {
if (tagElement && !event.altKey && !event.shiftKey) {
/// #if !MOBILE
openGlobalSearch(protyle.app, `#${tagElement.textContent}#`, !ctrlIsPressed, {method: 0});
hideElements(["dialog"]);
@ -2769,7 +2769,7 @@ export class WYSIWYG {
focusByRange(range);
}
if (ctrlIsPressed && range.toString() === "") {
if (ctrlIsPressed && range.toString() === "" && !event.shiftKey && !event.altKey) {
let ctrlElement = hasClosestBlock(event.target);
if (ctrlElement) {
const embedBlockElement = isInEmbedBlock(ctrlElement);