# \[Solved\] Phaser 3 Request fullscreen, not working

**URL:** <https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695>\
**Category:** Phaser 3\
**Created:** [January 10, 2019, 5:59am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695 "2019-01-10T05:59:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![willis](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@willis](https://phaser.discourse.group/u/willis)\
**Post date:** [January 10, 2019, 5:59am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695/1 "2019-01-10T05:59:30Z")

</div>

Hi everyone

Currently i still don’t get a solution to make fullscreen working.

Mostly I use a fullscreen library (screenfull.js) that i used on my previous games (createjs), and this library are not working with phaser 3, so, i try using default request fullscreen fuction, but still not working.

 ![lalal](https://global.discourse-cdn.com/free1/uploads/phaser1/original/1X/8d87b23d06c44ce96b2cb5bca58447ec8e0a70c7.png)

Is there any built-in fullscreen function for Phaser 3 ?

---

<div class="post-metadata">

**Author:** ![Antriel](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/antriel/32/15_2.png) [@Antriel](https://phaser.discourse.group/u/Antriel)\
**Post date:** [January 10, 2019, 6:30am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695/2 "2019-01-10T06:30:20Z")

</div>

As the error indicates, you need to do the request from inside user gesture callback. Phaser doesn’t have that handled very well, but it does provide you with [addUpCallback](https://photonstorm.github.io/phaser3-docs/Phaser.Input.InputPlugin.html#addUpCallback__anchor).

---

<div class="post-metadata">

**Author:** ![willis](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@willis](https://phaser.discourse.group/u/willis)\
**Post date:** [January 10, 2019, 8:17am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695/3 "2019-01-10T08:17:08Z")

</div>

How to implement this with a sprite on click/pointerdown?

---

<div class="post-metadata">

**Author:** ![Antriel](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/antriel/32/15_2.png) [@Antriel](https://phaser.discourse.group/u/Antriel)\
**Post date:** [January 10, 2019, 8:43am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695/4 "2019-01-10T08:43:23Z")

</div>

Something like:

```javascript
button.on('pointerdown', function() {
    this.input.addUpCallback(function() {
        //user-gesture handling here (open links, request fullscreen, ...)
    }, true);
}, this);

```

It’s not perfect though, given how Phaser works, it could miss the up callback if the user is fast enough (and/or fps too low). Then the action will happen on the next up callback, which works but could be weird for the user.  
But it shouldn’t happen much, only if the user releases the button faster than the next frame is rendered, which is usually between 7-40ms, which is _very_ fast compared to speed of clicking.

---

<div class="post-metadata">

**Author:** ![willis](https://avatars.discourse-cdn.com/v4/letter/w/74df32/32.png) [@willis](https://phaser.discourse.group/u/willis)\
**Post date:** [January 10, 2019, 8:48am UTC](https://phaser.discourse.group/t/solved-phaser-3-request-fullscreen-not-working/695/5 "2019-01-10T08:48:53Z")

</div>

Thanks! it’s working! my fullscreen button are working now.
