mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
142abbe8e1
commit
d7321cccec
2 changed files with 10 additions and 3 deletions
|
|
@ -348,7 +348,9 @@ export const isCurrentEditor = (blockId: string) => {
|
||||||
if (activeElement) {
|
if (activeElement) {
|
||||||
const tab = getInstanceById(activeElement.getAttribute("data-id"));
|
const tab = getInstanceById(activeElement.getAttribute("data-id"));
|
||||||
if (tab instanceof Tab && tab.model instanceof Editor) {
|
if (tab instanceof Tab && tab.model instanceof Editor) {
|
||||||
if (tab.model.editor.protyle.block.rootID !== blockId && tab.model.editor.protyle.block.id !== blockId) {
|
if (tab.model.editor.protyle.block.rootID !== blockId &&
|
||||||
|
tab.model.editor.protyle.block.parentID !== blockId && // updateBacklinkGraph 时会传入 parentID
|
||||||
|
tab.model.editor.protyle.block.id !== blockId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1407,8 +1407,13 @@ export class WYSIWYG {
|
||||||
hideElements(["hint", "util"], protyle);
|
hideElements(["hint", "util"], protyle);
|
||||||
const backlinkBreadcrumbItemElement = hasClosestByClassName(event.target, "protyle-breadcrumb__item");
|
const backlinkBreadcrumbItemElement = hasClosestByClassName(event.target, "protyle-breadcrumb__item");
|
||||||
if (backlinkBreadcrumbItemElement) {
|
if (backlinkBreadcrumbItemElement) {
|
||||||
if (backlinkBreadcrumbItemElement.getAttribute("data-id")) {
|
const breadcrumbId = backlinkBreadcrumbItemElement.getAttribute("data-id")
|
||||||
|
if (breadcrumbId) {
|
||||||
|
if (window.siyuan.ctrlIsPressed) {
|
||||||
|
openFileById({id: breadcrumbId, action: [Constants.CB_GET_FOCUS]});
|
||||||
|
} else {
|
||||||
loadBreadcrumb(protyle, backlinkBreadcrumbItemElement);
|
loadBreadcrumb(protyle, backlinkBreadcrumbItemElement);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 引用标题时的更多加载
|
// 引用标题时的更多加载
|
||||||
getBacklinkHeadingMore(backlinkBreadcrumbItemElement);
|
getBacklinkHeadingMore(backlinkBreadcrumbItemElement);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue