Skip to content

Commit

Permalink
bug renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
bunsenstraat committed Sep 25, 2023
1 parent bedb2c5 commit 971f87c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions libs/remix-ui/workspace/src/lib/components/file-label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export const FileLabel = (props: FileLabelProps) => {
editModeOff(labelRef.current.innerText)
labelRef.current.innerText = file.name
}
if (event.which === 27) {
event.preventDefault()
editModeOff(labelRef.current.innerText)
}
}

const handleEditBlur = (event: React.SyntheticEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export function Workspace() {
return {
...prevState,
focusContext: {element: path, x: pageX, y: pageY, type},
focusEdit: {...prevState.focusEdit, lastEdit: content},
focusEdit: {...prevState.focusEdit, element: null, lastEdit: content},
showContextMenu: prevState.focusEdit.element !== path
}
})
Expand Down

0 comments on commit 971f87c

Please sign in to comment.