From 1dc254a755696b943258746ad5411d857f70a468 Mon Sep 17 00:00:00 2001 From: akumatus <12724894+akumatus@users.noreply.github.com> Date: Fri, 21 Jun 2024 03:01:14 +0000 Subject: [PATCH] fix: auto focus and select the input when notification modal prompt (#7286) - Use `autofill` attribute instead of `input.focus()` on ref - Auto focus and select all content of the input when prompt --- .../blocksuite/block-suite-editor/specs/custom/spec-patchers.tsx | 1 + 1 file changed, 1 insertion(+) 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 a7edacdb1e..18ac7131fe 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 @@ -189,6 +189,7 @@ export function patchNotificationService( placeholder={placeholder} defaultValue={value} onChange={e => (value = e)} + ref={input => input?.select()} /> );