[Solved]Tab key cancels player's movement

Maybe I should post this in the javascript forum.
This is a very strange problem. If I press tab in game, the character stops moving, unless I release and press the direction keys again. I have tested that it happens in a fresh project as well.
Since I'm using tab for a "speed up" function, it becomes a little nuisance.
What's more strange, it only happens when the first time I press the tab key. After that, the problem is gone. So every time I open the game and try to use the tab key while the player is moving, the player just stops. The problem returns when I click the game screen with the mouse.

I know I can use another key like shift, but does anyone happes to know the reason?
I think it might be related to the default action of the Tab key (change focused element). Adding this small plugin seems to fix the issue for me:
Spoiler: plugin code
JavaScript:
/*:
 * @target MV
 * @plugindesc Prevent tab from interrupting input.
 * @author Caethyril
 * @url https://forums.rpgmakerweb.com/threads/170221/
 * @help Free to use and/or modify for any project, no credit required.
 */
;void (function(alias) {
  Input._shouldPreventDefault = function(kc) {
    if (kc === 9) return true;
    return alias.apply(this, arguments);
  };
})(Input._shouldPreventDefault);
I checked and it turns out MZ has this by default: it's probably just an oversight in the MV core scripts.
@caethyril Thank you, it is fixed.
I can't say for sure, though it does look like 'tab' is not listed under the preventdefault function in MV but is in MZ:
JavaScript:
Input._shouldPreventDefault = function(keyCode) {
    switch (keyCode) {
        case 8: // backspace
        case 9: // tab
        case 33: // pageup
        case 34: // pagedown
        case 37: // left arrow
        case 38: // up arrow
        case 39: // right arrow
        case 40: // down arrow
            return true;
    }
    return false;
};
Maybe try that?
Edit: ninja'd by @caethyril

Original thread: https://forums.rpgmakerweb.com/threads/solved-tab-key-cancels-players-movement.170221/