-
Notifications
You must be signed in to change notification settings - Fork 135
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
Notes get deleted by CTRL+Z #308
Comments
I was able to reproduce this, and I think that you're right! If anybody knows how to fix this: a pull request is very welcome 😃 |
Well, we could listen to the keyevent and call |
A simple solution would be to have a flag that blocks ctrl-z until the file is edited. However, it then becomes a tricky problem of how to disable it again when the file is in the original condition. If it's possible to keep track of "edits" discretely, you could have a counter which increments for each edit event. When a ctrl-z happens, this counter is decremented until it hits 0 again, and ctrl-z is again disabled. I don't know how feasible this is, but it does look like the browser has some sort of timer to know how far to undo, rather than actual characters. If you can figure out that part, disabling ctrl-z could be done like this:
|
Had the same issue today and wanted to open an issue here, but then I found this issue. |
@korelstar |
If I open an existing note with a text in it and I push CTRL+Z once it get immediately back to the "new" state. Of course I can undo this with a CTRL+Y, but I think it is better to avoid that the first CTRL+Z delete a note.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: