Cannot press spacebar when phaser on same page

Hi, I am implementing a phaser game with a chatbar on the side. However, because I enabled hotkeys, I cannot press spacebar when im focused on the chat textarea. Does anyone have any ideas on how to fix this? So far I have tried:

`

        const chatDOM = document.getElementById("message-to-send")
        const gameDOM = document.getElementById("game")

        gameDOM.addEventListener('click', () => {
            this.enableKeys();
        })

        chatDOM.addEventListener('focus', () => {
            this.disableKeys();
        })

`

it works in disabling hotkeys when the game is out of focus, but i am still unable to make any spaces
the chat works perfectly when rendered independent of any phaser game

try this on your Phaser scene:

scene.input.keyboard.clearCaptures();

same error occurs with me, and this command not solved my problem

scene.input.keyboard.clearCaptures();