# Drag event doesn't work

**URL:** <https://phaser.discourse.group/t/drag-event-doesnt-work/9475>\
**Category:** Phaser 3\
**Created:** [May 4, 2021, 8:04am UTC](https://phaser.discourse.group/t/drag-event-doesnt-work/9475 "2021-05-04T08:04:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mastertaco](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/mastertaco/32/5290_2.png) [@Mastertaco](https://phaser.discourse.group/u/Mastertaco)\
**Post date:** [May 4, 2021, 8:04am UTC](https://phaser.discourse.group/t/drag-event-doesnt-work/9475/1 "2021-05-04T08:04:32Z")

</div>

Hi, I’m trying to make a container that can be dragged with the mouse, I’ve checked out this example:

[https://labs.phaser.io/edit.html?src=src/game%20objects/container/draggable%20container.js&v=3.54.0#](https://labs.phaser.io/edit.html?src=src/game%20objects/container/draggable%20container.js&v=3.54.0#)

The problem is that this code doesn’t work on my program, the drag event doesn’t work, but I checked out what would happen if I use it on the “Making your first Phaser 3 game” code and it works perfectly in there. I don’t know why is this happening, only that event isn’t working.

---

<div class="post-metadata">

**Author:** ![Milton](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Milton](https://phaser.discourse.group/u/Milton)\
**Post date:** [May 4, 2021, 8:28am UTC](https://phaser.discourse.group/t/drag-event-doesnt-work/9475/2 "2021-05-04T08:28:33Z")

</div>

> [@How to send an dom element in the background](https://phaser.discourse.group/t/how-to-send-an-dom-element-in-the-background/9451):
>
> AFAIK Dom elements are always in the front when created. How can i send them into the background till i need them? Because they seem to overwrite my game window so that nothing is clickable anymore but the DOM Element.

> [@DOM Container blocks pointer events](https://phaser.discourse.group/t/dom-container-blocks-pointer-events/9261):
>
> I let Phaser create a DOM container, but the container blocks the pointer events for the game. Hovering over game objects does not work. Could someone help me?
