Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo / redo not working #79

Closed
eyssette opened this issue May 8, 2022 · 14 comments
Closed

Undo / redo not working #79

eyssette opened this issue May 8, 2022 · 14 comments

Comments

@eyssette
Copy link

eyssette commented May 8, 2022

Your app is really great! Unfortunately, undo / redo seems to be broken.
Is there any way to make it work?
Thank you!

@antonmedv
Copy link
Owner

It seems working for me. What is your setup?

@eyssette
Copy link
Author

eyssette commented May 8, 2022

I'm using Codejar for a mindmap app https://mymarkmap.vercel.app/. Undo/redo doesn't work on Mac OS (Monterey 12.2.1) or Lubuntu (20.04), whatever browser I try to use.

It's the same for the examples on your website https://medv.io/codejar/.

@antonmedv
Copy link
Owner

Works for me on macOS via Chrome. Also I use USA keyboard.

@eyssette
Copy link
Author

eyssette commented May 8, 2022

I'm using a French keyboard.

@antonmedv
Copy link
Owner

Probably this is a reason.

@eyssette
Copy link
Author

eyssette commented May 8, 2022

Same problem in a previous version of your app with a solution : #37
But not working for other keyboards : #58

@eyssette
Copy link
Author

eyssette commented May 8, 2022

Maybe using keyCode would be better (event if it's supposed to be deprecated). Same comment here : #73

@ShiriCZ
Copy link

ShiriCZ commented Aug 19, 2022

I have the same problem. I'm using Czech keyboard layout. The fix is simple just rewrite lines 453 and 457 (codejar.ts) in isUndo/isRedo function from
event.code === 'KeyZ';
to
event.keyCode == 90;
Then it should work on every keyboard layout, because KeyCode is universal.

@julianpoemp
Copy link
Contributor

redo & undo still not working (German Keyboard)

@julianpoemp
Copy link
Contributor

julianpoemp commented Jan 7, 2023

@antonmedv I just created a PR that solves this issue for everyone who uses other keyboard layouts than QUERTY. Can you please merge it?

@julianpoemp
Copy link
Contributor

because this issue is still not fixed I created a repository with a build from my fix. You can install it via

npm install --save julianpoemp/codejar-fixed-redo-undo --legacy-peer-deps

Repository: https://github.com/julianpoemp/codejar-fixed-redo-undo

@antonmedv
Copy link
Owner

Will try to release it today.

@simcolin
Copy link

+1 would love to see the PR be merged

@antonmedv
Copy link
Owner

Released 3.7.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants