Skip to content

Commit

Permalink
fix: make undo/redo functions work again
Browse files Browse the repository at this point in the history
closes #24
  • Loading branch information
simonwep committed Dec 26, 2023
1 parent a66eff2 commit dfed7cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/store/state/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const createDataStore = (storage?: Storage): Store => {
(v) => Object.assign(state, v)
);

window.addEventListener('keypress', (evt: KeyboardEvent) => {
document.addEventListener('keydown', (evt: KeyboardEvent) => {
if (evt.ctrlKey || evt.metaKey) {
if (evt.code === 'KeyZ') {
history.undo();
Expand Down

0 comments on commit dfed7cb

Please sign in to comment.