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