fix(core): linked doc named input box has excessive desire to select all (#8861)

Fix issue [AF-1706](https://linear.app/affine-design/issue/AF-1706).
This commit is contained in:
akumatus
2024-11-20 06:25:36 +00:00
parent 2857568f03
commit b0ca3c6d58
3 changed files with 16 additions and 12 deletions

View File

@@ -169,10 +169,10 @@ export function patchNotificationService({
<div>
<span style={{ marginBottom: 12 }}>{toReactNode(message)}</span>
<Input
autoSelect={true}
placeholder={placeholder}
defaultValue={value}
onChange={e => (value = e)}
ref={input => input?.select()}
/>
</div>
);
@@ -190,6 +190,7 @@ export function patchNotificationService({
onCancel: () => {
resolve(null);
},
autoFocusConfirm: false,
});
abort?.addEventListener('abort', () => {
resolve(null);