# Disabled button still clickable? Bug? 🐛

**URL:** <https://community.weweb.io/t/disabled-button-still-clickable-bug/14528>\
**Category:** Ask us anything\
**Created:** [November 14, 2024, 1:40am UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528 "2024-11-14T01:40:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Matthew](https://community.weweb.io/u/Matthew)\
**Post date:** [November 14, 2024, 1:40am UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/1 "2024-11-14T01:40:05Z")

</div>

I have a button that is disabled. It shows disabled; however, it is still clickable and the link shows at the bottom of the screen even while it’s disabled. I don’t believe this happened until recently. Is this something going on with the new update? Screenshots below.

**Button disabled:**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/14f446da30ef862ab51fd84720cdbd09ee8eb4b6.png)

**URL that is set (set all the time, but only supposed to work when button NOT disabled):**

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9f8385bcea1fd616c51a5a9ee2e75790dcc9f6c4.png)

**Result: button shows disabled, but is still clickable** :

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/1/1f7804374142a84c2d33474710e8e1f29f130e2d.png)

---

<div class="post-metadata">

**Author:** ![Yaj](https://avatars.discourse-cdn.com/v4/letter/y/eb8c5e/32.png) [@Yaj](https://community.weweb.io/u/Yaj)\
**Post date:** [November 14, 2024, 3:33am UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/2 "2024-11-14T03:33:15Z")

</div>

I just tested in case as this would be a massive problem for us if it did and I could not replicate this issue

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/f5a03956dc3228a1d71fc62c356e53b5f2600b80.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0a5a62bd3b7186e2365b721811d15f0c4c8400b4.png)  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/d/d205b1a4c9abdf67b4a32c2f184eda5d1e544f89.png)

This is what the variable should look like if it worked, I tested by turning disabled off

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/f/fb31d1e863037ec1ba34f29718ee41e3082d8531.png)

So unsure if you have a bug or something else going on.

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 14, 2024, 6:17am UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/3 "2024-11-14T06:17:48Z")

</div>

Disabled doesn’t prevent click I’m afraid. Disabled should just prevent focus and form submits. You might as well handle this yourself in a workflow.

---

<div class="post-metadata">

**Author:** ![Matthew](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Matthew](https://community.weweb.io/u/Matthew)\
**Post date:** [November 14, 2024, 1:26pm UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/4 "2024-11-14T13:26:13Z")

</div>

Can you try it with a regular link (not workflow)?

---

<div class="post-metadata">

**Author:** ![Matthew](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Matthew](https://community.weweb.io/u/Matthew)\
**Post date:** [November 14, 2024, 1:28pm UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/5 "2024-11-14T13:28:51Z")

</div>

Thanks Broberto, but are you saying that the buttons are an `<a>` anchor element styled to look like a button? If so, then it may make sense that it would need to then disabled with CSS or JS pointer-events: none, because disabled is not a valid attribute for an `<a>` tag.

However, if it’s a hyperlink like `<button onclick="location.href='example.com'"> then` I thought the disabled attribute will prevent that behavior from triggering.

Any idea what’s going on with the button element specifically? Also it is a normal button in weweb (not submit) fwiw.

Thanks!

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 14, 2024, 1:30pm UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/6 "2024-11-14T13:30:58Z")

</div>

Any HTML property (which the disabled probably is) won’t prevent JavaScript (which is a Workflow) from firing. You need to check in a workflow for a sign that it’s disabled.

---

<div class="post-metadata">

**Author:** ![Matthew](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@Matthew](https://community.weweb.io/u/Matthew)\
**Post date:** [November 14, 2024, 1:44pm UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/7 "2024-11-14T13:44:23Z")

</div>

The link was on the normal Edit tab → link section (not a workflow). Switching it to a workflow did make disable work. However, now the link cannot be right clicked and opened in new tab or any “normal” link options. Have you ever found a way to make the normal link on a button work and be disabled when the button itself is disabled, or any custom handling to do that instead of always making an “on-click: navigate to page” workflow on every button?

---

<div class="post-metadata">

**Author:** ![Broberto](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/broberto/32/5918_2.png) [@Broberto](https://community.weweb.io/u/Broberto)\
**Post date:** [November 14, 2024, 1:48pm UTC](https://community.weweb.io/t/disabled-button-still-clickable-bug/14528/8 "2024-11-14T13:48:35Z")

</div>

I think the disabled works only for forms with buttons with a Type set to “Button”
