When I’m using arrows in my game, the whole website is moving(e.g. when tapping up and down arrow, it works like scroll). Is that intended behavior or just default? Is there a way to fix this?
It happens on Chrome, not on Firefox.
When I’m using arrows in my game, the whole website is moving(e.g. when tapping up and down arrow, it works like scroll). Is that intended behavior or just default? Is there a way to fix this?
It happens on Chrome, not on Firefox.
Do you get the same behavior in full-screen mode ?
I believe no. How can I even see the website moving if the game is full screen?) I actually remove the full screen button because my games are made to fit my website, and are meant to be played in that size.
True. I meant to ask if the up/down arrow buttons work in fullscreen mode.
Does your webgl canvas have focus when pressing up/down arrows ?
Anyway, I think we let the browser handle those key presses after we process them. Let me check…
In Unity 5.2.2 I am not seeing the behavior you described. Which Unity version are you using ?
5.2.2f1, it happens only in chrome. I will send you the game link in pm.
I am able to repro the same problem in Chrome (Firefox works fine). I’ll create a bug report and investigate the issue.
Here is the bug tracker: Unity Issue Tracker - [WebGL] Chrome/Safari/Edge itself reacts to arrow keys even WebGL content is active
Still happens in 5.3.1. Any prediction of when it’ll be fixed? Really annoying.
should be fixed in 5.3.1p4 or newer.
I am trying to build webgl with unity 5.4, but arrows and WASD input don’t work in the web page (both firefox and chrome). I tried modifying the page code as suggested in another post, but it was not possible to fix it. Do you have any suggestions? Thanks