# Stop POINTER\_DOWN events after GAMEOBJECT\_POINTER\_DOWN event

**URL:** <https://phaser.discourse.group/t/stop-pointer-down-events-after-gameobject-pointer-down-event/2118>\
**Category:** Phaser 3\
**Created:** [April 15, 2019, 9:04pm UTC](https://phaser.discourse.group/t/stop-pointer-down-events-after-gameobject-pointer-down-event/2118 "2019-04-15T21:04:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MiniBobbo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/minibobbo/32/1208_2.png) [@MiniBobbo](https://phaser.discourse.group/u/MiniBobbo)\
**Post date:** [April 15, 2019, 9:04pm UTC](https://phaser.discourse.group/t/stop-pointer-down-events-after-gameobject-pointer-down-event/2118/1 "2019-04-15T21:04:04Z")

</div>

Hello everyone,  
I’m just getting into Phaser and I’m having some problems getting my click events to work. Here’s a simple code example.

```
export class TestScene extends Phaser.Scene {
    preload() {
    }
    create() {
        let g = this.add.zone(0,0,30,30).setInteractive();
        g.on(Phaser.Input.Events.GAMEOBJECT_POINTER_DOWN, function() {console.log('Game Object clicked'); this.input.stopPropagation()}, this);    
        this.input.on(Phaser.Input.Events.POINTER_DOWN, function() {console.log('Screen clicked');}, this);
    }
}

```

I would expect that after the GAMEOBJECT\_POINTER\_DOWN event was called it would stop the propagation and the POINTER\_DOWN event would never fire, but they both are. What is the correct way to only have the higher up event handlers stop the propagation of events?

---

<div class="post-metadata">

**Author:** ![theNeedle](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/theneedle/32/745_2.png) [@theNeedle](https://phaser.discourse.group/u/theNeedle)\
**Post date:** [April 15, 2019, 9:22pm UTC](https://phaser.discourse.group/t/stop-pointer-down-events-after-gameobject-pointer-down-event/2118/2 "2019-04-15T21:22:48Z")

</div>

see in [docs](https://photonstorm.github.io/phaser3-docs/Phaser.Input.Events.html#event:GAMEOBJECT_POINTER_DOWN), call back is passes 4 arguments `(pointer, localX, localY, event)`. You can call `event.stopPropogation()` to stop it from going up.

[This](https://rexrainbow.github.io/phaser3-rex-notes/docs/site/touchevents/#quick-start) would help too.

---

<div class="post-metadata">

**Author:** ![MiniBobbo](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/minibobbo/32/1208_2.png) [@MiniBobbo](https://phaser.discourse.group/u/MiniBobbo)\
**Post date:** [April 15, 2019, 9:56pm UTC](https://phaser.discourse.group/t/stop-pointer-down-events-after-gameobject-pointer-down-event/2118/3 "2019-04-15T21:56:42Z")

</div>

Thanks. That’s the piece that I was missing. I was trying to call the stopPropagation() on this.input and not on the event. I swear I’ve been looking at examples and reading documentation for an hour and not finding anything but it seems obvious now that you’ve pointed it out.

So this callback works like expected:

`function(pointer, x, y, event) {console.log('Game Object clicked'); event.stopPropagation();}`
