diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx index a9c36ad7d..482c98f3d 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx @@ -169,14 +169,19 @@ export function patchNotificationService( confirmText, placeholder, cancelText, + autofill, abort, }) => { return new Promise(resolve => { - let value = ''; + let value = autofill || ''; const description = (
{toReactNode(message)} - (value = e)} /> + (value = e)} + />
); openConfirmModal({ @@ -189,7 +194,6 @@ export function patchNotificationService( cancelButtonOptions: { children: cancelText ?? 'Cancel', }, - onConfirm: () => { resolve(value); }, @@ -229,9 +233,12 @@ export function patchNotificationService( onClick: notification.action.onClick, } : undefined, + onDismiss: notification.onClose, }, { duration: notification.duration || 0, + onDismiss: notification.onClose, + onAutoClose: notification.onClose, } );