New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with fullscreen api #4352
Comments
I see this same behavior on macOS / Safari. |
A fix to this is to set a parent property of the scale object in the game config like this: config = { scale: { parent: 'parent' ... } ... }; |
I already have parent property set in the game config, still this error occurs. |
The scale part of the config needs its own parent option. I can confirm without it, this error happens and with it, it does not when paired with the correct parent. |
This is what I have in my game config. Please advise what do you think needs a change here
Html body is simply defined as
|
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the |
The error is gone but there is another issue. "Esc" key works fine in case of FIT mode but in RESIZE mode, it sends wrong width and height (which is the fullscreen width and height) so now the game cuts off in RESIZE mode. Pressing "Esc" key will not resize the RESIZE mode game to new width and height. It works fine in both modes when it is done via a button click. |
OS: Windows 8.1
Browser: Google Chrome
API version - 3.16.1
I am using following code to enter and leave fullscreen
This function is called on a button click. This works fine and can enter as well as exit fullscreen mode when I use the button but if I use "esc" key to exit fullscreen mode then it no longer works. Debugging it in console gives following error
Further debugging shows that opening fullscreen mode is inserting a DOM element which is deleted on exit fullscreen mode but if "esc" key is used to exit fullscreen mode, then that element is not getting deleted so next time trying to open fullscreen mode fails.
The text was updated successfully, but these errors were encountered: