All mouse inputs are bound to the canvas by default, but I saw in documentation that you can change the target to be any other DOM element.
You can change in the config:
https://photonstorm.github.io/phaser3-docs/Phaser.Core.Config.html#inputTouchEventTarget__anchor
And you can change in mouse manager:
https://photonstorm.github.io/phaser3-docs/Phaser.Input.Mouse.MouseManager.html#target__anchor
I tried but nothing happened. I don’t want to have a canvas for input listener I want to have DOM that phaser creates if you enable dom in config: dom:{createContainer: true}.
The reason I want to change this is when you are using DOM for UI and hover with the mouse over some div, the game will not detect mouse move on canvas because DOM is at the top and if I add custom eventLisenter for mousemove than mouse x and y are not correct because phaser is scaling, using camera etc and i just cant find the right formula to calculate that.