Skip to content

Commit

Permalink
Event.preventDefault now triggers for targeted keys only #1199
Browse files Browse the repository at this point in the history
  • Loading branch information
rat-moonshine committed Jul 27, 2023
1 parent 7ea57ae commit 08986a5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,16 @@ package actionScripts.plugins.ui.editor.text
{
if ((event.keyCode == 22 || event.ctrlKey) && !event.altKey)
{
event.stopImmediatePropagation();
event.preventDefault();

switch (event.keyCode)
{
case Keyboard.Y: // Y
event.stopImmediatePropagation();
event.preventDefault();
markEventAsPending('redo');
break;
case Keyboard.Z: // Z
event.stopImmediatePropagation();
event.preventDefault();
markEventAsPending('undo');
break;
}
Expand Down

0 comments on commit 08986a5

Please sign in to comment.