Phaser "isDown" running havoc on Safari

Hello,

I’m doing the phaser course and I’m stuck at getting user input through the isDown function: on safari, this function is called every frame once I press a key and never stops. It seems to get stuck in an infinite loop. The same code works fine on Chrome. Any idea as to what might be causing that and how to fix it? Here is my code:

<html>
  <head>
    <script src="//cdn.jsdelivr.net/npm/phaser@3.24.1/dist/phaser.js"></script>
  </head>
  <body>
    <p>Hello there</p>
    <script>
      const gameState = {};

      function preload() {
        this.load.image(
          "codey",
          "https://content.codecademy.com/courses/learn-phaser/codey.png"
        );
      }

      function create() {
        gameState.codey = this.add.sprite(150, 200, "codey");
        // Set cursor keys here!
        gameState.cursors = this.input.keyboard.createCursorKeys();
      }

      function update() {
        // Update based on keypress here!
        if (gameState.cursors.left.isDown) {
          gameState.codey.x -= 1;
          console.log("Key is down");
        } else if (gameState.cursors.right.isDown) {
          gameState.codey.x += 1;
          console.log("Key is down");
        } else if (gameState.cursors.up.isDown) {
          gameState.codey.y -= 1;
          console.log("Key is down");
        } else if (gameState.cursors.down.isDown) {
          gameState.codey.y += 1;
          console.log("Key is down");
        }
      }

      const config = {
        type: Phaser.AUTO,
        width: 400,
        height: 500,
        backgroundColor: "#5f2a55",
        scene: {
          preload,
          create,
          update,
        },
      };

      const game = new Phaser.Game(config);
    </script>
  </body>
</html>

And here is the behavior on Safari:

Hello, and welcome to the forums!

First, I need to preface this by saying that I don’t have Safari or a device capable of running a recent version of it, so I can’t test it directly. Maybe someone else will be able to jump in with first-hand experience.

Do you happen to have any extensions like Evernote Web Clipper? That one in particular is popular and has been known to cause issues with keyboard events in Phaser. I remember coming across it when I reviewed old notes on GitHub