Fix win undo overide in text by moving "BODY" check
This removes per letter native undo whenever world.js is visible, as native chromium undo conflicted with react undo on windows.
Does not fix settings pages.
@@ -134,10 +134,8 @@ class World extends Component {
};
onKeyDown = e => {
- if (e.target.nodeName !== "BODY") {
- return;
- }
if (e.code === "KeyZ" && e.ctrlKey) {
+ // Overide Accelerator undo for windows, fixes chrome undo conflict
if (e.shiftKey) {
const { redo } = this.props;
e.preventDefault();
@@ -148,6 +146,9 @@ class World extends Component {
undo();
}
}
+ if (e.target.nodeName !== "BODY") {
+ return;
+ }
if (e.ctrlKey || e.shiftKey || e.metaKey) {
return;
}
