Fixed ctrl+z not working inside input

This commit is contained in:
Lucas Oliveira 2024-01-06 11:45:33 -03:00
commit 6abac9782d
2 changed files with 2 additions and 1 deletions

View file

@ -112,6 +112,8 @@ export default function ParameterComponent({
if (data.node!.template[name].value !== newValue) {
takeSnapshot();
}
data.node!.template[name].value = newValue; // necessary to enable ctrl+z inside the input
setNode(data.id, (oldNode) => {
let newNode = cloneDeep(oldNode);

View file

@ -100,7 +100,6 @@ export default function Page({
event.preventDefault(); // prevent the default action
redo();
} else if (event.key === "z" && (event.ctrlKey || event.metaKey)) {
console.log("nao era pra tar aqui");
event.preventDefault();
undo();
}