# Can't click through HTML Dom

**URL:** <https://phaser.discourse.group/t/cant-click-through-html-dom/11692>\
**Category:** Phaser 3\
**Created:** [May 13, 2022, 12:02pm UTC](https://phaser.discourse.group/t/cant-click-through-html-dom/11692 "2022-05-13T12:02:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codergautam](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/codergautam/32/5756_2.png) [@codergautam](https://phaser.discourse.group/u/codergautam)\
**Post date:** [May 13, 2022, 12:02pm UTC](https://phaser.discourse.group/t/cant-click-through-html-dom/11692/1 "2022-05-13T12:02:02Z")

</div>

So, I’m trying to build a UI with HTML, and add it to my game using the Phaser Dom. I’ve attached my html file below:  
[classpicker.html](https://phaser.discourse.group/uploads/short-url/xlbgncUMvnzF8IUWEBux3D0ZuTv.html) (1.2 KB)

This is the code I use to add it into the dom:

```javascript
if(!this.classPicker) this.classPicker = this.add.dom(this.canvas.width/2, 0).createFromCache("classpicker").setDepth(100).setOrigin(0);

```

Note: I already put it inside the cache, and this.canvas is an alias for document.documentElement.clientWidth/Height

Now, when I play, it doesn’t detect mousemoves there, or any clicks either. Here’s a video of the issue:

[https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/a/a1e465f041d66467fa7995c39c48c2293e21dc00.mp4](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/a/a1e465f041d66467fa7995c39c48c2293e21dc00.mp4)

Is there any way to fix this? Thanks!

---

<div class="post-metadata">

**Author:** ![Kosmoon](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/kosmoon/32/4855_2.png) [@Kosmoon](https://phaser.discourse.group/u/Kosmoon)\
**Post date:** [May 18, 2022, 6:12pm UTC](https://phaser.discourse.group/t/cant-click-through-html-dom/11692/2 "2022-05-18T18:12:56Z")

</div>

Try applying the css `pointer-events: none;` to it

---

<div class="post-metadata">

**Author:** ![codergautam](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/codergautam/32/5756_2.png) [@codergautam](https://phaser.discourse.group/u/codergautam)\
**Post date:** [May 18, 2022, 6:42pm UTC](https://phaser.discourse.group/t/cant-click-through-html-dom/11692/3 "2022-05-18T18:42:16Z")

</div>

I tried that, didn’t work.
