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

[ScaleManager] TypeError: this.removeFullscreenTarget is not a function #4605

Closed
darklightcode opened this issue Jun 21, 2019 · 1 comment
Closed

Comments

@darklightcode
Copy link

darklightcode commented Jun 21, 2019

Version

  • Phaser Version: 3.18.1
  • Operating system: Microsoft Windows [Version 10.0.18362.175]
  • Browser: Google Chrome 75.0.3770.100 (Official Build) (64-bit)
  • Browser: Firefox 67.0.4 (64-bit)

Description

I have tried implementing the fullscreen functionality in my game using this.scale.toggleFullscreen(), and hoped that it will scale my game properly, but instead i got an error in the console TypeError: this.removeFullscreenTarget is not a function.
I have tried the Fullscreen Demo from examples, and the scaling is done properly (but the error is still triggered, perhaps from this.scale.stopFullscreen(); ), so it's safe to assume that my code is wrong, but the removeFullscreenTarget error slipped into 3.18.1 from 3.18.0-beta1.
( I was using this previously because 3.17 was failing on Internet Explorer 11 )

See the error in the image attached.

phaser_3 18 1

Example Test Code


let item = this.add
            .image(0, 0, 'background_default')
            .setOrigin(0.12, 0); 

item.setInteractive();
item.on('pointerdown', ()=>{
    if(!this.scale.isFullscreen) {
        this.scale.toggleFullscreen(); // will trigger the error
        // this.scale.startFullscreen(); // this works ok
     }
}, this);

@photonstorm
Copy link
Collaborator

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.

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