mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-24 16:04:06 +01:00
This commit is contained in:
parent
c88f99646c
commit
508eb93183
33 changed files with 111 additions and 108 deletions
|
|
@ -25,7 +25,7 @@ export const confirmDialog = (title: string, text: string,
|
|||
dialog.element.addEventListener("click", (event) => {
|
||||
let target = event.target as HTMLElement;
|
||||
const isDispatch = typeof event.detail === "string";
|
||||
while (target && (target !== dialog.element) || isDispatch) {
|
||||
while (target && target !== dialog.element || isDispatch) {
|
||||
if (target.id === "cancelDialogConfirmBtn" || (isDispatch && event.detail=== "Escape")) {
|
||||
if (cancel) {
|
||||
cancel(dialog);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue