# Pointermove issue after scrolling on mobile page in 3.60.0 version

**URL:** https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208
**Category:** Phaser 3
**Created:** [April 28, 2023, 1:23pm UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208 "2023-04-28T13:23:22Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![hyewonjo](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hyewonjo](https://phaser.discourse.group/u/hyewonjo)
#### Post date: [April 28, 2023, 1:23pm UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/1 "2023-04-28T13:23:22Z")

</div>

It seems that the pointermove area is not updated when scrolling the page to which the canvas belongs in the mobile version browser.  
I placed the canvas in the middle of the scrolling page.  
When scrolling does not occur when entering the page for the first time, the canvas is located at the bottom edge of the page, and at this time, the pointermove event of the input occurs well.  
Next, when the scroll is moved to the middle of the page, the canvas comes to the center of the page. At this time, when I touch on the canvas, the pointermove occurs in the upper area of the canvas and the pointermove does not occur in the lower area.  
Please solve it.

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [April 28, 2023, 1:45pm UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/2 "2023-04-28T13:45:44Z")

</div>

👋

Need a test case to reproduce the problem.

---

<div class="post-metadata">

### Author: ![hyewonjo](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hyewonjo](https://phaser.discourse.group/u/hyewonjo)
#### Post date: [April 30, 2023, 12:07am UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/3 "2023-04-30T00:07:54Z")

</div>

Thanks for the reply.  
Below is the source I tested.  
The process was performed in the Google Chrome browser, and the Google Chrome browser version is 112.0.5615.138 (official build) (64-bit).

Create a mobile environment using developer mode in the Chrome browser.  
The dimension is iPhone SE (375\*667).  
When the page loads for the first time, the canvas will pop up with a black screen.  
If you touch the canvas with the pointer, ‘pointermove’ will be written in the Console tab of Chrome Developer Tools.  
Then, scroll down and drag the black canvas slightly below the center of the screen with the pointer.  
The ‘pointermove’ will be taken when dragging the top of the canvas and not when dragging the bottom of the canvas.  
On my website, my canvas game will be placed where it will require a lot of scrolling on the page.  
I also tested with phaser version 3.55.2 and it worked fine. And in version 3.55.2, if you drag from a black screen to a white screen, then ‘pointermove’ is also recorded. The pointermove event area seems to be wider.  
please answer about my question.

```html
<!doctype html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>test</title>
    <style>
        body {
            margin: 0;
        }
    </style>
    <script src="lib/phaser.min.js"></script>
    <script>
        class Scene extends Phaser.Scene {
            preload() {

            }
            create() {
                this.input.on('pointermove', () => {
                    console.log('pointermove');
                });
            }
            update() {

            }
        }

        const WIDTH = 320;
        const HEIGHT = 480;

        const config = {
            type: Phaser.AUTO,
            parent: 'minigame',
            scale: {
                parent: 'minigame',
                mode: Phaser.Scale.NONE,
                width: WIDTH,
                height: HEIGHT
            },
            physics: {
                default: 'arcade',
            },
            fps: {
                forceSetTimeOut: true,
                target: 60
            },
            scene: [Scene]
        };

        const game = new Phaser.Game(config);
    </script>
</head>
<body>
<div>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
<div>
<div id="minigame">
</div>
</div>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
    <h1>hi</h1>
</div>
</body>
</html>

```

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [May 1, 2023, 1:19pm UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/5 "2023-05-01T13:19:50Z")

</div>

Thanks, I reproduced this. You could open an issue on the GitHub repository.

---

<div class="post-metadata">

### Author: ![hyewonjo](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hyewonjo](https://phaser.discourse.group/u/hyewonjo)
#### Post date: [May 2, 2023, 12:31am UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/6 "2023-05-02T00:31:26Z")

</div>

Thank you for answer. Is there any way I can do it in the current version?

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [May 2, 2023, 8:13pm UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/7 "2023-05-02T20:13:12Z")

</div>

I don’t know what’s causing the problem. ☹

---

<div class="post-metadata">

### Author: ![hyewonjo](https://avatars.discourse-cdn.com/v4/letter/h/2bfe46/32.png) [@hyewonjo](https://phaser.discourse.group/u/hyewonjo)
#### Post date: [May 3, 2023, 12:30am UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/8 "2023-05-03T00:30:22Z")

</div>

I downloaded the source from the phaser github repository and opened it.  
I modified one part and tested it and it seems to work well.

The file path is ‘src/input/InputManager.js’ and the line number is 617.

### Before edit

```javascript
var element = document.elementFromPoint(changedTouch.pageX, changedTouch.pageY);

```

### After edit

```javascript
var element = document.elementFromPoint(changedTouch.clientX, changedTouch.clientY);

```

Please review.

---

<div class="post-metadata">

### Author: ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)
#### Post date: [May 3, 2023, 11:24am UTC](https://phaser.discourse.group/t/pointermove-issue-after-scrolling-on-mobile-page-in-3-60-0-version/13208/9 "2023-05-03T11:24:42Z")

</div>

You could make a PR or add that to the issue on GitHub.
