mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 08:46:09 +01:00
This commit is contained in:
parent
62b1c51ec4
commit
46b004129d
1 changed files with 5 additions and 5 deletions
|
|
@ -66,6 +66,11 @@ export class Title {
|
|||
if (event.isComposing) {
|
||||
return;
|
||||
}
|
||||
if (this.editElement.textContent === "") {
|
||||
this.editElement.querySelectorAll("br").forEach(item => {
|
||||
item.remove()
|
||||
});
|
||||
}
|
||||
this.rename(protyle);
|
||||
});
|
||||
this.editElement.addEventListener("compositionend", () => {
|
||||
|
|
@ -164,11 +169,6 @@ export class Title {
|
|||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
this.editElement.addEventListener("keyup", (event: KeyboardEvent) => {
|
||||
this.editElement.querySelectorAll("br").forEach(item => {
|
||||
item.remove()
|
||||
})
|
||||
})
|
||||
const iconElement = this.element.querySelector(".protyle-title__icon");
|
||||
iconElement.addEventListener("click", () => {
|
||||
if (window.siyuan.shiftIsPressed) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue