mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-13 07:56:14 +01:00
This commit is contained in:
parent
a9651ad07e
commit
9117bf9ad1
4 changed files with 16 additions and 12 deletions
|
|
@ -30,7 +30,7 @@ import {code160to32} from "../util/code160to32";
|
|||
export class Title {
|
||||
public element: HTMLElement;
|
||||
public editElement: HTMLElement;
|
||||
private timeout: number
|
||||
private timeout: number;
|
||||
|
||||
constructor(protyle: IProtyle) {
|
||||
this.element = document.createElement("div");
|
||||
|
|
@ -229,7 +229,7 @@ export class Title {
|
|||
}
|
||||
|
||||
private rename(protyle: IProtyle) {
|
||||
clearTimeout(this.timeout)
|
||||
clearTimeout(this.timeout);
|
||||
if (!validateName(this.editElement.textContent)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -240,8 +240,8 @@ export class Title {
|
|||
path: protyle.path,
|
||||
title: fileName,
|
||||
});
|
||||
this.setTitle(fileName)
|
||||
}, Constants.TIMEOUT_INPUT)
|
||||
this.setTitle(fileName);
|
||||
}, Constants.TIMEOUT_INPUT);
|
||||
}
|
||||
|
||||
private renderMenu(protyle: IProtyle, iconElement: Element, position: { x: number, y: number }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue