Vanessa 2023-03-16 10:04:53 +08:00
parent 3897377a31
commit cb85bb8080

View file

@ -1292,7 +1292,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
if (!nodeElement.classList.contains("code-block")) {
if (!nodeElement.classList.contains("code-block") && !event.repeat) {
const findToolbar = protyle.options.toolbar.find((menuItem: IMenuItem) => {
if (!menuItem.hotkey) {
return false;
@ -1497,7 +1497,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
return;
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) {
if (!event.repeat && matchHotKey(window.siyuan.config.keymap.editor.general.duplicate.custom, event)) {
event.preventDefault();
event.stopPropagation();
let selectsElement: HTMLElement[] = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));