
Firefox onFullScreenChange Event not Firing
I am developing a JavaScript CSS HTML Canvas application using VS Code and Firefox. As the code renders graphics to the canvas - the size of the canvas is critical. Identifying chages in screen size works perfectly for normal resizing events. However - going into fullscreen mode does not work. I have tried a number of different event listeners:
document.addEventListener('fullscreenchange', setCanvasDimensions, false);
document.addEventListener('mozfullscreenchange', setCanvasDimensions, false); document.addEventListener('MSFullscreenChange', setCanvasDimensions, false); document.addEventListener('webkitfullscreenchange', setCanvasDimensions, false);
None of these events fire when the screen goes into fullscreen mode. My apologies if this has already been addressed elsewhere or if this is a total newbie problem - I have searched for a solution although none seem to work. Any help with this would be appreciated. Stay safe.