Fix firefox bug where user can't focus on input while renaming file on editor file tree (#11134)

GitOrigin-RevId: daebbe6df4a3fef41cbf25444a31015d306901b3
This commit is contained in:
M Fahru 2023-01-10 08:10:45 -07:00 committed by Copybot
parent 5f8e10de86
commit 67c8fa560e

View file

@ -10,10 +10,12 @@ import { useDraggable } from '../../contexts/file-tree-draggable'
import FileTreeItemName from './file-tree-item-name'
import FileTreeItemMenu from './file-tree-item-menu'
import { useFileTreeSelectable } from '../../contexts/file-tree-selectable'
import { useFileTreeActionable } from '../../contexts/file-tree-actionable'
function FileTreeItemInner({ id, name, isSelected, icons }) {
const { permissionsLevel } = useEditorContext(editorContextPropTypes)
const { setContextMenuCoords } = useFileTreeMainContext()
const { isRenaming } = useFileTreeActionable()
const { selectedEntityIds } = useFileTreeSelectable()
@ -60,6 +62,7 @@ function FileTreeItemInner({ id, name, isSelected, icons }) {
})}
role="presentation"
ref={dragRef}
draggable={!isRenaming}
onContextMenu={handleContextMenu}
>
<div