From 6d9aceb7275e3fd374cb83403b59b105cd802905 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Fri, 6 May 2022 15:12:27 +0100 Subject: [PATCH] The `Key.reset` method no longer resets the `Key.enabled` or `Key.preventDefault` booleans back to `true` again, but only resets the state of the Key. Fix #6098 --- src/input/keyboard/keys/Key.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/keyboard/keys/Key.js b/src/input/keyboard/keys/Key.js index 165282d3a..251fb7f76 100644 --- a/src/input/keyboard/keys/Key.js +++ b/src/input/keyboard/keys/Key.js @@ -325,6 +325,8 @@ var Key = new Class({ /** * Resets this Key object back to its default un-pressed state. * + * As of version 3.60.0 it no longer resets the `enabled` or `preventDefault` flags. + * * @method Phaser.Input.Keyboard.Key#reset * @since 3.6.0 * @@ -332,8 +334,6 @@ var Key = new Class({ */ reset: function () { - this.preventDefault = true; - this.enabled = true; this.isDown = false; this.isUp = true; this.altKey = false;