lewish / asciiflow

ASCIIFlow
https://asciiflow.com
MIT License
4.67k stars 360 forks source link

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

Open Trung0246 opened 3 years ago

Trung0246 commented 3 years ago

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.

damageboy commented 2 years ago

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

iamakulov commented 3 months ago

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: https://github.com/lewish/asciiflow/pull/301