Disabled button still clickable? Bug? 🐛

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:

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

Result: button shows disabled, but is still clickable:

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



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

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

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.

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

1 Like

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!

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.

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?

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

1 Like