# @click event not working in the editors

**URL:** <https://community.weweb.io/t/click-event-not-working-in-the-editors/10331>\
**Category:** Developer corner\
**Tags:** custom-components, components\
**Created:** [August 19, 2024, 11:31pm UTC](https://community.weweb.io/t/click-event-not-working-in-the-editors/10331 "2024-08-19T23:31:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![northdynamic](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@northdynamic](https://community.weweb.io/u/northdynamic)\
**Post date:** [August 19, 2024, 11:31pm UTC](https://community.weweb.io/t/click-event-not-working-in-the-editors/10331/1 "2024-08-19T23:31:18Z")

</div>

I am working on a custom component and the @click directive does not respond but the @mousedown does? When published the click directive works as intended but it makes it difficult to develop and test without needing to publish.

For the meantime I just added code to the mousedown handler to also handle click events but this is not ideal.

I can’t find anything in the documentation as to something restricting this or a better workaround. weweb support told me to post in the community when asked.

Does anyone know a way to get the clck directive working in the editor and/or local dev editor?

[ScreenVideo](https://streamable.com/sfauaw)

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [August 20, 2024, 4:09am UTC](https://community.weweb.io/t/click-event-not-working-in-the-editors/10331/2 "2024-08-20T04:09:06Z")

</div>

wothout seing the code I think it’s because you need to switch to preview mode to test clicks (in your video you are in edit mode)

---

<div class="post-metadata">

**Author:** ![northdynamic](https://avatars.discourse-cdn.com/v4/letter/n/71e660/32.png) [@northdynamic](https://community.weweb.io/u/northdynamic)\
**Post date:** [August 20, 2024, 11:00pm UTC](https://community.weweb.io/t/click-event-not-working-in-the-editors/10331/3 "2024-08-20T23:00:50Z")

</div>

Thanks for responding, I feel silly now! I didn’t realize this because the other event were working.

---

<div class="post-metadata">

**Author:** ![dorilama](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/dorilama/32/10403_2.png) [@dorilama](https://community.weweb.io/u/dorilama)\
**Post date:** [August 21, 2024, 5:34am UTC](https://community.weweb.io/t/click-event-not-working-in-the-editors/10331/4 "2024-08-21T05:34:49Z")

</div>

no problem, it happened to me as well 🙂
