# Phaser 3 game not scrolled when page scrolls

**URL:** <https://phaser.discourse.group/t/phaser-3-game-not-scrolled-when-page-scrolls/4244>\
**Category:** Phaser 3\
**Created:** [November 13, 2019, 12:39pm UTC](https://phaser.discourse.group/t/phaser-3-game-not-scrolled-when-page-scrolls/4244 "2019-11-13T12:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jagriti04](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jagriti04](https://phaser.discourse.group/u/jagriti04)\
**Post date:** [November 13, 2019, 12:39pm UTC](https://phaser.discourse.group/t/phaser-3-game-not-scrolled-when-page-scrolls/4244/1 "2019-11-13T12:39:03Z")

</div>

I am developing a game using Phaser 3.18 and the game is part of an angular app(using angular 8). There are buttons in the game created by using the setInteractive() function. The game and buttons work fine. But when the page is scrolled the buttons do not work properly i.e. the hitArea of buttons is not updated. The whole game scrolls with the page but the coordinates of buttons don’t update.

Code of button created:

```
var sprite = this.add.sprite(screen_width*0.5, screen_height*0.5, 'eye').setInteractive();
sprite.setScale(1.5);
sprite.on('pointerdown', function(event){
  console.log('here click working');
});

```

Config function of Phaser game:

```javascript
function config(render_type){
    this.type=render_type;
    this.scale = {
        width: 800,
        height: 400,
        mode: phaser.Scale.FIT,
        parent: "phaser-example",
        autoCenter: phaser.Scale.CENTER_BOTH,
    };
    this.physics= {
        default: 'arcade',
        arcade: {
            gravity: { y: 3000 },
            debug: false

            }
        };

    this.scene={
        preload: preload,
        create: create,
        update: update
    };
};
```

---

<div class="post-metadata">

**Author:** ![APS](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@APS](https://phaser.discourse.group/u/APS)\
**Post date:** [September 3, 2020, 8:08pm UTC](https://phaser.discourse.group/t/phaser-3-game-not-scrolled-when-page-scrolls/4244/2 "2020-09-03T20:08:08Z")

</div>

Hello my friend!  
It is late answer but i just registered. I have the same issue and to fix it i add:

this.scale.refresh();

In the update method of the scene.
