mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 07:16:10 +01:00
🐛 https://github.com/siyuan-note/insider/issues/1114 无法回车完成修改列名
This commit is contained in:
parent
f8b7d1539b
commit
3312d0de09
1 changed files with 10 additions and 0 deletions
|
|
@ -285,6 +285,16 @@ export const showColMenu = (protyle: IProtyle, blockElement: HTMLElement, cellEl
|
|||
menu.addItem({
|
||||
icon: getColIconByType(type),
|
||||
label: `<input style="margin: 4px 0" class="b3-text-field" type="text" value="${cellElement.innerText.trim()}">`,
|
||||
bind(element) {
|
||||
element.querySelector("input").addEventListener("keydown", (event: KeyboardEvent) => {
|
||||
if (event.isComposing) {
|
||||
return
|
||||
}
|
||||
if (event.key === "Enter") {
|
||||
menu.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
if (type !== "block") {
|
||||
menu.addItem({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue