Skip to content

Commit

Permalink
Fixed a user-reported bug in the hotkey handler that I dont know how …
Browse files Browse the repository at this point in the history
…to reproduce.
  • Loading branch information
bp2008 committed Apr 23, 2018
1 parent 10e88ee commit 3cccaab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui3/ui3.js
Expand Up @@ -13245,9 +13245,9 @@ function BI_Hotkeys()
var currentlyDownKeys = {};
$(document).keydown(function (e)
{
if ($("body").children(".dialog_overlay").length != 0)
var charCode = e.which;
if ($("body").children(".dialog_overlay").length != 0 || !charCode)
return;
var charCode = e.which ? e.which : event.keyCode;
var hotkeysBeingRepeated = currentlyDownKeys[charCode];
if (hotkeysBeingRepeated)
{
Expand Down Expand Up @@ -13308,7 +13308,9 @@ function BI_Hotkeys()
});
$(document).keyup(function (e)
{
var charCode = e.which ? e.which : event.keyCode;
var charCode = e.which;
if (!charCode)
return;
var hotkeysBeingReleased = currentlyDownKeys[charCode];
currentlyDownKeys[charCode] = false;
var retVal = true;
Expand Down

0 comments on commit 3cccaab

Please sign in to comment.