bug renaming

fix_filteing_event
filip mertens 1 year ago committed by Aniket
parent dcefcc338d
commit ee2fa95a99
  1. 4
      libs/remix-ui/workspace/src/lib/components/file-label.tsx
  2. 2
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -52,6 +52,10 @@ export const FileLabel = (props: FileLabelProps) => {
editModeOff(labelRef.current.innerText) editModeOff(labelRef.current.innerText)
labelRef.current.innerText = file.name labelRef.current.innerText = file.name
} }
if (event.which === 27) {
event.preventDefault()
editModeOff(labelRef.current.innerText)
}
} }
const handleEditBlur = (event: React.SyntheticEvent) => { const handleEditBlur = (event: React.SyntheticEvent) => {

@ -469,7 +469,7 @@ export function Workspace() {
return { return {
...prevState, ...prevState,
focusContext: {element: path, x: pageX, y: pageY, type}, 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 showContextMenu: prevState.focusEdit.element !== path
} }
}) })

Loading…
Cancel
Save