mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-25 02:13:00 +08:00
fix(core): fix menu bugs (#8074)
This commit is contained in:
@@ -43,7 +43,6 @@ export const BlocksuiteHeaderTitle = (props: BlockSuiteHeaderTitleProps) => {
|
||||
return (
|
||||
<InlineEdit
|
||||
className={clsx(styles.title, props.className)}
|
||||
autoSelect
|
||||
value={docTitle}
|
||||
onChange={onChange}
|
||||
editable={!isSharedMode}
|
||||
|
||||
@@ -376,9 +376,9 @@ export const ExplorerTreeNode = ({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{renameable && renaming && (
|
||||
{renameable && (
|
||||
<RenameModal
|
||||
open
|
||||
open={!!renaming}
|
||||
width={sidebarWidth - 32}
|
||||
onOpenChange={setRenaming}
|
||||
onRename={handleRename}
|
||||
|
||||
@@ -116,7 +116,10 @@ export function NormalPageHeader({ page, workspace }: PageHeaderProps) {
|
||||
useDetailPageHeaderResponsive(containerWidth);
|
||||
|
||||
const onRename = useCallback(() => {
|
||||
setTimeout(() => titleInputHandleRef.current?.triggerEdit());
|
||||
setTimeout(
|
||||
() => titleInputHandleRef.current?.triggerEdit(),
|
||||
500 /* wait for menu animation end */
|
||||
);
|
||||
}, []);
|
||||
|
||||
const title = useDocCollectionPageTitle(workspace.docCollection, page?.id);
|
||||
|
||||
Reference in New Issue
Block a user