mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 快照回车绑定
This commit is contained in:
parent
ea245973ad
commit
7ee9691a8c
2 changed files with 8 additions and 2 deletions
|
|
@ -66,9 +66,9 @@ export class Dialog {
|
|||
});
|
||||
}
|
||||
|
||||
public bindInput(inputElement: HTMLInputElement, enterEvent?: () => void) {
|
||||
public bindInput(inputElement: HTMLInputElement | HTMLTextAreaElement, enterEvent?: () => void) {
|
||||
inputElement.focus();
|
||||
inputElement.addEventListener("keydown", (event) => {
|
||||
inputElement.addEventListener("keydown", (event: KeyboardEvent) => {
|
||||
if (event.isComposing) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue