mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
fdfd453e2b
commit
7ae90058c3
1 changed files with 7 additions and 3 deletions
|
|
@ -236,11 +236,15 @@ const getActiveEditor = (wndActive = true) => {
|
||||||
if (!editor && !wndActive) {
|
if (!editor && !wndActive) {
|
||||||
let activeTime = 0;
|
let activeTime = 0;
|
||||||
allEditor.forEach(item => {
|
allEditor.forEach(item => {
|
||||||
const headerElement = item.protyle?.model.parent.headElement;
|
const headerElement = item.protyle.model?.parent.headElement;
|
||||||
if (headerElement && headerElement.classList.contains("item--focus") && parseInt(headerElement.dataset.activetime) > activeTime) {
|
if (headerElement) {
|
||||||
|
if (headerElement.classList.contains("item--focus") && parseInt(headerElement.dataset.activetime) > activeTime) {
|
||||||
activeTime = parseInt(headerElement.dataset.activetime);
|
activeTime = parseInt(headerElement.dataset.activetime);
|
||||||
editor = item;
|
editor = item;
|
||||||
}
|
}
|
||||||
|
} else if (item.protyle.element.getBoundingClientRect().height > 0) {
|
||||||
|
editor = item;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/// #else
|
/// #else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue