Sorry, I have to report that there seems to be a bug affecting only Firefox which causes problems with things like universal camera navigation. In Firefox, whenever I use directional keys to try to control a universal camera I find that only the forward and back keys work. The left/right buttons tend to cause the browser to shift focus to something other than the canvas.
In my app, instead of strafing the universal camera, pressing left or right would cause an input field to receive focus. On other pages it seems that other items on the page can receive focus when pressing left or right, for instance in this playground; Babylon.js Playground pressing left or right causes a panel to receive focus.
I don’t get this issue on chromium based browsers. Babylon seem better able to keep the focus on the WebGL canvas in chromium. I don’t have a mac to test this on Safari.
I know Firefox is not the most popular browser these days but I still thought I should flag this up.
I can not repro the issue on my machine in firefox it is really strange.
@Evgeni_Popov and @RaananW could you check if you repro ?
Works for me as well.
Just making sure - the left and right arrows work as expected - scene moves right and left correctly.
Sorry I should have mentioned that I am on Firefox 80.0.1 (64-bit) on Windows 10. I tried with private browsing in case it was some add on, but still see the same behaviour. If there is some input or other panel on the page (such as the inspector), then pressing left/right arrow will shift focus away from canvas.
I tried the same configuration than you and still can not repro locally, could you try disabling any extensions you might have ?
OK, am very sorry, I might have wasted your time here. I have discovered what the problem was. I tried disabling add-ons etc but still the same behaviour, but then when Sebavan said you have tried the same configuration it gave me the idea to check my Firefox settings. It seems that at some point I have checked the option in Firefox for “Always use the cursor keys to navigate within pages”…
It is this option which is causing focus to shift from the canvas. It’s an accessibility feature which I don’t even use so am not sure why I checked it.
Perhaps it was worth knowing that this happens anyway…disabled users may check this option and this will affect some apps. Worth bearing in mind.
Sorry for wasting time
No problem at all it could have been a bug on our side it is better to check twice