mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 23:38:49 +01:00
This commit is contained in:
parent
0c9f588ada
commit
22ffc30245
3 changed files with 8 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ import {genUUID} from "../util/genID";
|
|||
import {moveResize} from "./moveResize";
|
||||
/// #endif
|
||||
import {isMobile} from "../util/functions";
|
||||
import {isCtrl} from "../protyle/util/compatibility";
|
||||
|
||||
export class Dialog {
|
||||
private destroyCallback: (options?: IObject) => void;
|
||||
|
|
@ -92,7 +93,7 @@ export class Dialog {
|
|||
event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
if (event.key === "Enter" && enterEvent) {
|
||||
if (!event.shiftKey && !isCtrl(event) && event.key === "Enter" && enterEvent) {
|
||||
enterEvent();
|
||||
event.preventDefault();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export class Setting {
|
|||
if (actionElement) {
|
||||
if (["INPUT", "TEXTAREA"].includes(actionElement.tagName)) {
|
||||
dialog.bindInput(actionElement as HTMLInputElement, () => {
|
||||
(btnsElement[1] as HTMLButtonElement).click();
|
||||
btnsElement[1].dispatchEvent(new CustomEvent("click"));
|
||||
});
|
||||
}
|
||||
if (actionElement.tagName === "TEXTAREA") {
|
||||
|
|
|
|||
|
|
@ -1395,6 +1395,9 @@ export class WYSIWYG {
|
|||
});
|
||||
|
||||
this.element.addEventListener("compositionend", (event: InputEvent) => {
|
||||
if ((event.target as HTMLElement).classList.contains("av__title")) {
|
||||
return;
|
||||
}
|
||||
event.stopPropagation();
|
||||
isComposition = false;
|
||||
const range = getEditorRange(this.element);
|
||||
|
|
@ -1421,7 +1424,8 @@ export class WYSIWYG {
|
|||
|
||||
this.element.addEventListener("input", (event: InputEvent) => {
|
||||
const target = event.target as HTMLElement;
|
||||
if (target.tagName === "VIDEO" || target.tagName === "AUDIO" || event.inputType === "historyRedo") {
|
||||
if (target.tagName === "VIDEO" || target.tagName === "AUDIO" || event.inputType === "historyRedo" ||
|
||||
target.classList.contains("av__title")) {
|
||||
return;
|
||||
}
|
||||
if (event.inputType === "historyUndo") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue