搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Firefox onFullScreenChange Event not Firing

  • 無回覆
  • 1 有這個問題
  • 9 次檢視
more options

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.

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.