mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
This commit is contained in:
parent
d93023fc8a
commit
72fba69115
8 changed files with 78 additions and 6 deletions
|
|
@ -26,6 +26,7 @@ import {getAllModels} from "./getAll";
|
|||
import {fetchPost} from "../util/fetch";
|
||||
import {onGet} from "../protyle/util/onGet";
|
||||
import {countBlockWord} from "./status";
|
||||
import {saveScroll} from "../protyle/scroll/saveScroll";
|
||||
|
||||
export class Wnd {
|
||||
public id: string;
|
||||
|
|
@ -488,6 +489,9 @@ export class Wnd {
|
|||
private removeTabAction = (id: string, closeAll = false) => {
|
||||
this.children.find((item, index) => {
|
||||
if (item.id === id) {
|
||||
if (item.model instanceof Editor) {
|
||||
saveScroll(item.model.editor.protyle);
|
||||
}
|
||||
if (this.children.length === 1) {
|
||||
this.destroyModel(this.children[0].model);
|
||||
this.children = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue