Skip to content
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

Fullscreen exiting immediately #4386

Closed
reinildo opened this issue Feb 20, 2019 · 1 comment
Closed

Fullscreen exiting immediately #4386

reinildo opened this issue Feb 20, 2019 · 1 comment

Comments

@reinildo
Copy link

Hi. Thanks for the great work.
I've forked a codepen from Samme, it is an example to go full screen with phaser.
If you apdate phaser version to 3.16.2 it stops working. Up to 3.16.1 it works fine.
here are the links to test:
https://codepen.io/reinildo/pen/omOaaB?editors=0110
https://codepen.io/reinildo/pen/qgwJQq?editors=0111

Thanks

@photonstorm
Copy link
Collaborator

3.16 contains built-in support for fullscreen, and this direct approach is conflicting with it. If you wish to carry on doing it your way, rather than using the Scale Manager, that is fine, but you need to stop the Scale Manager from handling the change request. The easiest way to do this is to replace the ScaleManager.onFullScreenChange function (just set it to a blank function).

Alternatively, if you don't need the Scale Manager at all, you can just call this.scale.stopListeners() to unbind it from the fullscreen handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants