"click" event in pointerLockControls

I want to activate camera rotation while mouse button in down.
so, I used pointerLockControls for that.
First, I used “mousedown” event to activate controls and deactivate it with “mouseup” event.
till this all things are going as expected.
but “click” event is not triggered after that.

        controlsPointer = new PointerLockControls(camera, document.body);
        window.addEventListener("mousedown", function(event){

            controlsPointer = new PointerLockControls(camera, document.body);

            controlsPointer.lock();

            onMousedown(event)

        });

        window.addEventListener("mouseup", function (event) {

            controlsPointer.unlock();

        })

        window.addEventListener("click", (event) => {

            console.log(event)

            console.log("clicked")

        })

I’ve enhanced the official pointer lock demo by a click event listener. Everything seems to work as expected. Check out the new code here: https://airy-fluffy-country.glitch.me/ (link will expire in a few days)

The important bit:

document.addEventListener( 'click', function() {
          
    console.log( 'click' );
          
} );