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

Ctrl+Z shortcut keeps executing browser's functionality instead of prevent it. #189

Open
Trung0246 opened this issue Apr 29, 2021 · 2 comments

Comments

@Trung0246
Copy link

Trung0246 commented Apr 29, 2021

Apparently asciiflow didn't call preventDefault to stop default browser behaviour on Ctrl+Z. Looking at the code seems like preventDefault only appear at touch input. I would suggest to add preventDefault on keyboard input too, especially with shortcut like Ctrl+Z which is a common shortcut on different browsers.

Browser: Vivaldi. OS: Win10.

@Trung0246 Trung0246 changed the title Ctrl+Z shortcut keep executing browser's functionality instead of prevent it. Ctrl+Z shortcut keeps executing browser's functionality instead of prevent it. Apr 29, 2021
@damageboy
Copy link

This is something I see locally on vivaldi too.
Is there a way to fix this?

iamakulov added a commit to iamakulov/asciiflow that referenced this issue Jun 10, 2024
This commit calls `preventDefault()` for a few keyboard shortcuts. Partially addresses lewish#189
@iamakulov
Copy link
Contributor

iamakulov commented Jun 10, 2024

Also stumbled upon this. On macOS, in Arc, Cmd+Z reopens the closed tab (unless .preventDefault() is called), and undoing changes in ASCIIFlow becomes quite more cumbersome :D

Likewise, Cmd+Y opens browsing history in all macOS browsers, which also conflicts with “redo” here.

Raised a PR to address this: #301

lewish pushed a commit that referenced this issue Jun 12, 2024
This commit calls `preventDefault()` for a few keyboard shortcuts. Partially addresses #189
lewish pushed a commit that referenced this issue Aug 6, 2024
This commit calls `preventDefault()` for a few keyboard shortcuts. Partially addresses #189
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

3 participants