mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 02:57:01 +00:00
This commit is contained in:
@@ -93,6 +93,9 @@ export const getContentByInlineHTML = (range: Range, cb: (content: string) => vo
|
|||||||
|
|
||||||
export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
editorElement.addEventListener("keydown", async (event: KeyboardEvent & { target: HTMLElement }) => {
|
editorElement.addEventListener("keydown", async (event: KeyboardEvent & { target: HTMLElement }) => {
|
||||||
|
if (!event.key) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (event.target.localName === "protyle-html" || event.target.localName === "input") {
|
if (event.target.localName === "protyle-html" || event.target.localName === "input") {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user