mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
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:
@@ -21,7 +21,7 @@ export const useAutoFocus = <T extends HTMLElement = HTMLElement>(
|
||||
export const useAutoSelect = <T extends HTMLInputElement = HTMLInputElement>(
|
||||
autoSelect?: boolean
|
||||
) => {
|
||||
const ref = useAutoFocus<T>(autoSelect);
|
||||
const ref = useRef<T | null>(null);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (ref.current && autoSelect) {
|
||||
|
||||
Reference in New Issue
Block a user